[PATCH]: Activate -Wc++-compat warnings for most C++ keywords
Joseph S. Myers
joseph@codesourcery.com
Wed Aug 6 19:47:00 GMT 2008
On Wed, 6 Aug 2008, Tom Tromey wrote:
> For this feature to really work nicely, I suppose we'd have to have
> special cases for some things like "wchar_t" which are (IIUC) typedefs
> in C and keywords in C++. IMO the best result would be that we would
> warn about uses that would be invalid in C++ (say, "wchar_t" as a
> variable name, assuming that is actually invalid, since I don't know),
> but not about the typedef itself (assuming it occurs in a system
> header) or uses of wchar_t as a type.
Yes, that is what I recommended for bool, wchar_t, char16_t and char32_t
<http://gcc.gnu.org/ml/gcc-patches/2008-07/msg00808.html> (where I also
noted special cases for asm, inline and the alternative representations
such as "and").
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list