[Bug driver/87161] if -Werror appear after -Wmissing-prototypes the warning is not turn into error

simon.marchi at polymtl dot ca gcc-bugzilla@gcc.gnu.org
Fri Mar 13 13:37:15 GMT 2020


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

Simon Marchi <simon.marchi at polymtl dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simon.marchi at polymtl dot ca

--- Comment #6 from Simon Marchi <simon.marchi at polymtl dot ca> ---
I also encountered this inconsistency when running g++ under ccache.  I can't
tell if this is a ccache or a gcc problem.  Running the exact same command with
and without ccache gives two different results:

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

$ g++ -c -Werror -Wmissing-prototypes test.cpp      
cc1plus: error: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC
but not for C++ [-Werror]


More information about the Gcc-bugs mailing list