[clang] [C23] Implement WG14 N3037 (PR #132939)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon May 5 04:36:17 PDT 2025
AaronBallman wrote:
> So one usability issue I noticed that we also had in GCC is that the warning about declaring structs in function prototypes (-Wvisibility) does not make sense anymore and becomes annoying. We turned it off in C23 for complete (but not for incomplete) structs) without tag.
Good to know! On the one hand, the type is *not* visible, but on the other hand, it can be compatible so you can call the function now I suppose. I had seen that and left the diagnostic on just so users didn't confuse these two situations:
```
struct S { int x; } f(void); // Can use struct S outside of f
void g(struct S { int x; }); // Cannot use struct S outside of g
```
but that doesn't necessarily seem worth leaving the diagnostic on for.
https://github.com/llvm/llvm-project/pull/132939
More information about the cfe-commits
mailing list