Re: C++ PATCH for c++/64235 - missing syntax error with invalid alignas

2019-06-21 Thread Jason Merrill
On 6/19/19 8:18 PM, Marek Polacek wrote: We are wrongly accepting invalid code like: struct alignas(16 S2 { }; // missing ) The reason is that cp_parser_type_specifier uses tentative parsing to see if we're dealing with a class-specifier, and if that doesn't work, it looks for an elaborated-

C++ PATCH for c++/64235 - missing syntax error with invalid alignas

2019-06-19 Thread Marek Polacek
We are wrongly accepting invalid code like: struct alignas(16 S2 { }; // missing ) The reason is that cp_parser_type_specifier uses tentative parsing to see if we're dealing with a class-specifier, and if that doesn't work, it looks for an elaborated-type-specifier. When trying to parse it as