Re: [PATCH] c++: warn about using keywords as identifiers [PR106111]

2022-07-01 Thread Jason Merrill via Gcc-patches
On 6/29/22 12:11, Marek Polacek wrote: In C++03, -Wc++11-compat should warn about int constexpr; since 'constexpr' is a keyword in C++11. Jonathan reports that we don't emit a similar warning for 'alignas' or 'alignof', and, as I found out, 'thread_local'. Similarly, we don't warn for most

[PATCH] c++: warn about using keywords as identifiers [PR106111]

2022-06-29 Thread Marek Polacek via Gcc-patches
In C++03, -Wc++11-compat should warn about int constexpr; since 'constexpr' is a keyword in C++11. Jonathan reports that we don't emit a similar warning for 'alignas' or 'alignof', and, as I found out, 'thread_local'. Similarly, we don't warn for most C++20 keywords. That happens because RID