[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 3 07:17:29 PDT 2025


AaronBallman wrote:

> > ```c++
> > typeof(int){} x; // Probably parsed as typeof(int{})
> > ```
> 
> GCC reject this https://godbolt.org/z/YEdnGh8T5

Yeah, I think there are a few different issues. 1) we should not accept in C. 2) C++ has its own issue in that we accept `typeof` there despite that not being conforming: https://godbolt.org/z/9s7r67zvT

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


More information about the cfe-commits mailing list