Re: [PATCH] c++: Allow mixing GNU/std-style attributes [PR69585]

2022-06-06 Thread Joseph Myers
On Fri, 3 Jun 2022, Marek Polacek via Gcc-patches wrote: > However, the patch does not touch the C FE. The C FE doesn't have > a counterpart to C++'s cp_parser_attributes_opt -- it only has > c_parser_transaction_attributes (which parses both GNU and [[]] > attributes), but that's TM-specific.

Re: [PATCH] c++: Allow mixing GNU/std-style attributes [PR69585]

2022-06-03 Thread Jason Merrill via Gcc-patches
On 6/3/22 20:05, Marek Polacek wrote: cp_parser_attributes_opt doesn't accept GNU attributes followed by [[]] attributes and vice versa; only a sequence of attributes of the same kind. That causes grief for code like: struct __attribute__ ((may_alias)) alignas (2) struct S { }; or

[PATCH] c++: Allow mixing GNU/std-style attributes [PR69585]

2022-06-03 Thread Marek Polacek via Gcc-patches
cp_parser_attributes_opt doesn't accept GNU attributes followed by [[]] attributes and vice versa; only a sequence of attributes of the same kind. That causes grief for code like: struct __attribute__ ((may_alias)) alignas (2) struct S { }; or #define EXPORT