Push GENERIC farther into C/C++ front ends.
Mark Mitchell
mark@codesourcery.com
Thu Jun 17 12:04:00 GMT 2004
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.
Maybe so.
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++.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
More information about the Gcc-patches
mailing list