This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ warnings vs. errors
- From: "Manuel López-Ibáñez" <lopezibanez at gmail dot com>
- To: "Ian Lance Taylor" <iant at google dot com>
- Cc: "Volker Reichelt" <v dot reichelt at netcologne dot de>, gcc at gcc dot gnu dot org
- Date: Wed, 11 Jun 2008 20:48:26 +0200
- Subject: Re: C++ warnings vs. errors
- References: <tkrat.d318c4730b1542b2@netcologne.de> <m33ankdo59.fsf@google.com>
2008/6/11 Ian Lance Taylor <iant@google.com>:
> Volker Reichelt <v.reichelt@netcologne.de> writes:
>
>> since Manuel's patch http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00962.html
>> a lot of C++ code is now accepted on mainline (when compiling without
>> special flags like -fpermissive and -pedantic), that used to be rejected.
>> Instead of getting closer to the standard we get away from it, which is a
>> bad idea IMHO - especially since the standard should be widely adopted by
>> now, given that it's about 10 years old. So here's a collection of some
>> warnings that I'd rather see as errors:
>
> It sounds like you want to change some pedwarns to permerrors. Go for
> it.
Absolutely. Thanks to Jonathan Wakely, we did change quite a few.
However, right now, I don't have neither the free time nor the
knowledge of the ISO C++ standard to go through all of them and
evaluate whether they should be pedwarns or permerrors.
So, just grep pedwarn gcc/cp/*.c and s/pedwarn/permerror/ as you see fit.
A tip: if it is guarded by "if (pedantic)" it should probably stay as
pedwarn. It doesn't make sense for a permerror to be guarded by the
"pedantic" flag.
Moreover, you will probably find things that we don't handle well when
using fpermissive, so they should be just errors.
Thanks,
Manuel.