This is the mail archive of the
ecos-devel@sources.redhat.com
mailing list for the eCos project.
Re: C vs C++ compilations
- From: Mark Salter <msalter at redhat dot com>
- To: gary at mlbassoc dot com
- Cc: ecos-devel at ecos dot sourceware dot org
- Date: Wed, 15 Oct 2003 09:44:13 -0400 (EDT)
- Subject: Re: C vs C++ compilations
- References: <1066224867.32461.16.camel@hermes>
>>>>> Gary Thomas writes:
> 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.
The future may be closer than you think. I recently heard some rumors
that -finit-priority will cause an error with bleeding edge gcc. That
flag was removed some years ago when the functionality was made the
default behavior.
--Mark