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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #6 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Anders Granlund from comment #4)
> In this case -w suppressed an error when combined with -pedantic-errors.
> Shouldn't -w only suppress warnings?

This is not how it works. -pedantic-errors (and -Werror) converts warnings into
errors, but -w suppresses all warnings, even before they are converted into
errors.

One could argue that conversion to error should happen before warnings are
suppressed (in order to make combinations such as -w -Werror=X do something
useful), but this has been the behavior since forever, I doubt it can be
changed now (unless you do an amazing job at proving that almost no one is
relying on the current behavior and you take care of implementing the change).

Reply via email to