cc1 warning when building gcc-3.1
Phil Edwards
phil@jaj.com
Wed Apr 17 19:02:00 GMT 2002
On Tue, Apr 16, 2002 at 07:47:52AM +0200, Christian Jönsson wrote:
> <snip>
> 2 ignoring command line option '-fno-implicit-templates'
> <snip>
> 2 (it is valid for C++ but not the selected language)
Your warning-counting program is a bit off. These are the same warning,
just split across lines.
[cxa_demangle.c and dyn-string.c]
> cc1: warning: ignoring command line option '-fno-implicit-templates'
> cc1: warning: (it is valid for C++ but not the selected language)
>
> Now, something's wrong here, right? But what is it?
The list of compiler options, including -fno-implicit-templates, is
predetermined in the makefiles. And we assume(d) that all the sources
would be C++. These two files are written in C. The compiler knows this,
and switches languages, and then correctly warns that we're passing some
C++ options.
Nothing particularly wrong. If you'd like to submit a makefile patch
which exmaines the lists of options, and strips the C++-only ones when
these two files are being compiled, that's cool.
There are other warnings emitted with these two files which are more serious.
Phil
--
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace. We seek
not your counsel, nor your arms. Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen. - Samuel Adams
More information about the Gcc-bugs
mailing list