Re: [pushed] c++: support C++11 attributes in C++98

2024-09-03 Thread Jason Merrill
On 9/3/24 7:00 PM, Andrew Pinski wrote: On Tue, Sep 3, 2024 at 3:01 PM Jason Merrill wrote: Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- I don't see any reason why we can't allow the [[]] attribute syntax in C++98 mode with a pedwarn just like many other C++11 features. In fact,

Re: [pushed] c++: support C++11 attributes in C++98

2024-09-03 Thread Andrew Pinski
On Tue, Sep 3, 2024 at 3:01 PM Jason Merrill wrote: > > Tested x86_64-pc-linux-gnu, applying to trunk. > > -- 8< -- > > I don't see any reason why we can't allow the [[]] attribute syntax in C++98 > mode with a pedwarn just like many other C++11 features. In fact, we > already do support it in so

[pushed] c++: support C++11 attributes in C++98

2024-09-03 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- I don't see any reason why we can't allow the [[]] attribute syntax in C++98 mode with a pedwarn just like many other C++11 features. In fact, we already do support it in some places in the grammar, but not in places that check cp_nth_token