This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Putting C++ code into gcc front end
Nathan Sidwell <nathan at codesourcery dot com> writes:
> Kaveh R. Ghazi wrote:
>> > The C++ frontend is written in K&R C with gcc extensions (talk about perverted).
>> The C++ frontend is (very slowly) being coverted to ISO C on the
>> mainline sources for 3.4.
> How practical would it be to have '-ansi -pedantic' supplied at stage2?
> Could we do it on a per front end basis? I suspect all but one of cp's
> gnuisms is by accident.
In principle you can just change the line setting "cp-warn" in
cp/Make-lang.in to apply whichever options you want: probably
-pedantic -Wno-long-long. (-ansi is a bad idea, it causes system
headers to change their definition set.)
It is trickier than that if you want the right thing done in stage 1,
because we need to suppress -Wno-long-long for old bootstrap compilers
that don't understand it. See what is currently done for
STRICT_WARN/STRICT2_WARN.
zw