[Bug c/86134] earlier diagnostic causes followup diagnostic about unknown -Wno-* options
rguenther at suse dot de
gcc-bugzilla@gcc.gnu.org
Thu Jun 14 07:50:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86134
--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 13 Jun 2018, msebor at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86134
>
> --- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
> As per the recent discussion:
> https://gcc.gnu.org/ml/gcc-patches/2018-06/msg00422.html
But the warning should never be elided to an error with -Werror.
> echo 'int main(){}' | gcc -S -x c -Wno-unknown-warning-option -Wall
-Werror -Wno-error=return-type -
<stdin>: In function ‘main’:
<stdin>:1:1: warning: control reaches end of non-void function
[-Wreturn-type]
<stdin>: At top level:
cc1: error: unrecognized command line option "-Wno-unknown-warning-option"
[-Werror]
cc1: all warnings being treated as errors
fails the compile but with the warning not emitted the error isn't
emitted. Also we do know the warning is guarded by -Wreturn-type
so I see no point in warning that it wasn't silenced by
-Wno-unknown-warning-option?
More information about the Gcc-bugs
mailing list