This is the mail archive of the ecos-devel@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C vs C++ compilations


>>>>> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]