- Notifications
You must be signed in to change notification settings - Fork14.5k
Closed
Description
Clang supports_Generic
as an extension in C++ mode, but the following C++ code doesn't parse when it should:
structS {int i;};voidfunc(structS s) { (void)_Generic(s,structS :1);// error: 'S' cannot be defined in a type specifier \ error: expected class name \ error: expected '{' after base class list }
This use is not defining a new type specifier, it's attempting to use an elaborated type specifier for referencing the type.