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]