[clang] [C] Add new -Wimplicit-int-enum-cast to -Wc++-compat (PR #137658)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri May 9 05:18:26 PDT 2025


AaronBallman wrote:

> @AaronBallman I met another case, giving the same error even after the fix. Sorry I only noticed it now:
> 
> ```
> const char *p;
> const char *pend;
> ...
> return (free (compile_stack.stack), p == pend ? REG_EBRACE : REG_BADBR));
> ```
> 
> Both REG_EBRACE, REG_BADBR are `reg_errcode_t `

Thank you! I can confirm the issue happens; I spent a few hours looking at it this morning and didn't have a solution, but ran out of time I could spend on it. Do you mind filing an issue so we don't lose track of it?

https://github.com/llvm/llvm-project/pull/137658


More information about the cfe-commits mailing list