This is the mail archive of the
ecos-devel@sources.redhat.com
mailing list for the eCos project.
C vs C++ compilations
- From: Gary Thomas <gary at mlbassoc dot com>
- To: eCos development <ecos-devel at ecos dot sourceware dot org>
- Date: 15 Oct 2003 07:34:28 -0600
- Subject: C vs C++ compilations
- Organization: MLB Associates
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