[Bug c++/81787] [5/6/7/8 Regression] `#pragma GCC diagnostic warning "-fpermissive"` no longer works since gcc 4.8

manu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 5 16:32:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81787

--- Comment #6 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #4)
> (In reply to Manuel López-Ibáñez from comment #2)
> > My personal opinion is that we should instead have -Wpermissive, which
> > defaults to -Werror=permissive and works like any other -W* option should
> > (and would work with #pragma). -fpermissive can then become an alias for
> > -Wpermissive, like I did with -pedantic -> -Wpedantic.
> 
> No no no no. It's not a warning option.

As far as I know, it is currently just an option controlling the type of
diagnostics, it doesn't change the meaning of the code. It doesn't change the
language. The doc just says:

Downgrade some diagnostics about nonconformant code from errors to warnings.
Thus, using -fpermissive allows some nonconforming code to compile.

Preventing users from downgrading the errors to warnings (or disabling them
completely) in specific parts of the code is just going to annoy people, as the
SO posts show.


More information about the Gcc-bugs mailing list