[Bug go/91172] Command line option for a wrong language is not reported with -Werror=warning_name syntax

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 16 08:14:00 GMT 2019


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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2019-07-16
           Assignee|ian at airs dot com                |marxin at gcc dot gnu.org
            Summary|go1: error: control reaches |Command line option for a
                   |end of non-void function in |wrong language is not
                   |libgo/go/cmd/cgo/gcc.go     |reported with
                   |                            |-Werror=warning_name syntax
     Ever confirmed|0                           |1
      Known to fail|                            |10.0

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
I've got:

$ gcc -Wtarget-lifetime /tmp/main.c
cc1: warning: command line option ‘-Wtarget-lifetime’ is valid for Fortran but
not for C

$ gcc -Wtarget-lifetime /tmp/main.c --help=warning -Q  | grep target-lifetime
cc1: warning: command line option ‘-Wtarget-lifetime’ is valid for Fortran but
not for C
  -Wtarget-lifetime                     [disabled]

But:

$ gcc -Werror=target-lifetime /tmp/main.c
$ gcc -Werror=target-lifetime /tmp/main.c --help=warning -Q  | grep target
  -Wtarget-lifetime                     [enabled]

Lemme take it.


More information about the Gcc-bugs mailing list