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

            Bug ID: 87161
           Summary: if -Werror appear after -Wmissing-prototypes the
                    warning is not turn into error
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nir.aizik at harman dot com
  Target Milestone: ---

Werror before Wmissing-prototypes gives:

g++ -c -Werror -Wmissing-prototypes test.c -o test.o
cc1plus: error: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC
but not for C++ [-Werror]
cc1plus: all warnings being treated as errors

Werror after Wmissing-prototypes gives:

g++ -c -Wmissing-prototypes -Werror test.c -o test.o
cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for
C/ObjC but not for C++


I believe both options should end with error or at least this behavior should
be documented

Reply via email to