This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Changes in C++ FE regarding pedwarns to be errors are harmful
On 09/01/2008, Ismail Dönmez <ismail@pardus.org.tr> wrote:
>
> Looks like this is actually mandated by standard :-( , thats what I am told on
> #gcc anyway :)
>
Not surprising since it is a pedwarn. It would be nice to point to the
relevant sections of the standard in the code as a comment, if you
know them. We do this for other pedwarns.
> I am not sure if this is irrelevant for all cases, so the current behaviour
> looks correct. The right way would be fixing all those apps not installing
> their config.h and not pollute global namespace but thats a huge task given
> that many projects are affected.
>
> So for now I guess we'll have to stick to -fpermissive. Thanks for your time
> and patience.
>
Of course there is a third option:
* Make pedwarns warnings by default unless -Werror or
--pedantic-errors are given (just like the C front-end).
I personally think that being pedantic when you have the possibility
of being permissive is not nice. In the current situation, it makes
completely sense to use -fpermissive always for the user flags (as
opposed to flags used during development) in a similar way as it makes
sense to never use -Werror for user flags. The next step is asking why
-fpermissive is not the default.
However, I was not around when this decision was taken, so there may
have been very good reasons for the current default. And perhaps those
reasons are still relevant nowadays.
Cheers,
Manuel.