C vs C++ compilations
Gary Thomas
gary@mlbassoc.com
Wed Oct 15 13:34:00 GMT 2003
I'm experimenting with GCC-3.3. This version is starting to be
*really* picky about some things. In particular, the eCos Makefile(s)
use XX-gcc to compile either C or C++ source files, often with
some C++ only flags thrown in. This leads to warnings like this:
cc1: warning: "-Woverloaded-virtual" is valid for C++ but not for C/ObjC
cc1: warning: "-fno-rtti" is valid for C++ but not for C/ObjC
cc1: warning: "-fvtable-gc" is valid for C++ but not for C/ObjC
I'd like to get rid of these and the best way [I think] would be
to change the rules so that C files are built using XXX-gcc using
C flags and C++ files are built using XXX-g++ with C++ flags. I
also think that over time, the compiler may decide that this is no
longer just a warning, but an error, so thinking about this now will
save us in the future.
Is there any [good] way to handle this? Can the Makefile generator
(CDL machine) be set up to handle both C and C++ (probably CXXFLAGS)?
Thanks.
Note: it works perfectly well, it's just noisy at the moment.
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
More information about the Ecos-devel
mailing list