[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 11 05:08:24 PDT 2024


AaronBallman wrote:

> Oh that makes sense so
> 
> ```
> static void f();
> void *k = _Generic(&f, void (*)(void) : 0, default : f);
> ```
> 
> should be ok since it is not in the result expression?

Correct, that's a good test case to add! Similarly, it would be good to add one like:
```
void *k = _Generic(&f, int (*)(void) : 0, default : f);
```
to show that it is diagnosed because it's used in the result expression.

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


More information about the cfe-commits mailing list