<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/82972>82972</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            warn/error for "enum-int-mismatch" missing
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          rscheff
      </td>
    </tr>
</table>

<pre>
    I've just been bitten by an issue around implicit type conversion from an enum type to an int(32) type...

Apparently, function definitions in clang, where an enum is passed in an int32 variable are implicitly acceptable.

However, gcc13 (not gcc12) does bark with -Wenum-int-mismatch when no explicit type conversion is made, or rather, the function definitions need to have the correct type when passing enum along...

Would it be possible to enable more strict warning / error checking, when implicit typecasts between enum/int are happening, or when a function header should have an enum, but does define an int where an enum is passed?

On gcc13, this seems to be the relevant switch: enum-int-mismatch
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U89y-jYQfhr5sgNjZGPwwQf6yzDtqcecZWltKZElj3YN5e07smnSNM0FAdr99vujVURuDIidOP4mji-FWtjG1CXSFoeh6KN5dH8IebohvC3E0CMG6B1zPh6gAjiiBUGluAQDbpq9046BHzOCjuGGiVwMMKQ45WoMy7Rdcly7Awt5rqSQ7fr3fr8X5YsoL9vnZZ5VwsD-IeQvGJagOaMZHFxw-SuBC6C9CmMuuFtM-DHGEcyKCE2u2WZVEm4qOdX7TBk_-PoHKK1x5nzzhcHv8Y43TBl91PpQgZDnEHn9sbI2EQl6ld7h7tjC7jXP3rnAu8nRpFjbTCtAiIB__eCOI5iUwTwkJkiK7TaRLf6_6IBosoNW3XCt0jEl1E_kdV6W7sK4WaF8DON_vH2NizfgcqYwRyKXTeEIGFZ7ppgQiJPTDHeVQsYS8gqYUkygLep39-F6-Jq8VsQEPfI9P5fMQMirC7x6btU8Y3j2xrS1q0-dFpXBBGRXfqtC9Q_IL-gX3ixf7cBnrj8lL6rrvyX_GbYQN28dASFOlEX3m40JPd5UYKC7Y21FdYFvcRamq0xbtarA7nAqz23VNmVd2K5qTK-0aY-Hsj6Zsu6Hc9OY0pyPhxpV0xSuk6WsSymbspVNXe-Pp-qk66ptKjNUlWxFXeKknN97f5v2MY3Ful3dWbYnWXjVo6d1U6UMeN9WT0iZFzd1uWfXLyOJuvSOmD5R2LHHLqco5HULcIgJhJTf1AkpYXLr0ymW5DvLPJOoLkJehbyOju3S73XMgWb457GbU3xDzTnmTIqEvK6k_w4AAP__NHF7Gg">