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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmalcolm at gcc dot gnu.org,
                   |                            |jsm28 at gcc dot gnu.org
           Keywords|                            |diagnostic
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-11-14
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
-w isn't supposed to resolve pedantic errors, that there's a separate warning
flag has historical reasons, disabling the warning shouldn't disable the error
IMO.

-Wno-error=incompatible-pointer-types -w

also disables the warning, now demoted to one.  I think this is how -w
is implemented, possibly

<source>:7:15: error: initialization of 'PFUNC' {aka 'void (*)(int)'} from
incompatible pointer type 'void (*)(double)' [-Wincompatible-pointer-types]

should instead say

<source>:7:15: error: initialization of 'PFUNC' {aka 'void (*)(int)'} from
incompatible pointer type 'void (*)(double)'
[-Werror=incompatible-pointer-types]

Interestingly -Werror=unused for example enables -Wunused and makes it an
error but -Werror=unused -w silences -Wunused errors.

So it's at least inconsistent behavior.  I'll confirm this bug for this fact.

Reply via email to