AaronBallman wrote:

> This seems really annoying to parse, I wonder why `_Generic` is even allowed 
> in C++ mode? this isn't the case in other compilers.

It's an extension Clang has supported in C++ for a long time: 
https://godbolt.org/z/jjWsTM65Y

> I guess C++ doesn't even allow defining types inside expressions? 

Correct; C allows you to define a type anywhere a type can be spelled, C++ has 
restrictions on where types can be defined. So this is expected behavior and 
the new behavior is a much better diagnostic than the old one. I'd add it as a 
test case for both C and C++.

https://github.com/llvm/llvm-project/pull/210353
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to