This is the mail archive of the
mailing list for the GCC project.
Re: Push GENERIC farther into C/C++ front ends.
Tom Tromey wrote:
It seems that the idea of having a C program also compilable by a C++
compiler comes up quite a bit. I wonder if it would make sense to
enable the C compiler to warn about the use of C++ keywords.
The things that seem to get more often broken (in my experience) are
things like the different rules about pointer conversions and the fact
that prototypes are required in C++. (The latter is something that we
should already be catching with warnings in GCC.) The conversions
between enumerations constants and integers (or lack thereof in C++) is
another place where people can easily write valid C that isn't valid C++.