https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106486
Bug ID: 106486 Summary: C++ warning for -Wmissing-prototypes is pure nuisance Product: gcc Version: 12.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hpa at zytor dot com Target Milestone: --- Since upgrading to gcc 12.1.1, I keep getting the following warning through various projects: cc1plus: warning: command-line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++ This warning is pure nuisance. In a mixed-language project it is *extra* important that the right prototypes are used, and it is far easier to enable -Wmissing-prototypes project wide. This warning implies that one would have to conditionalize the -W options based on the language of an input file, which is often painful to do without structural Makefile changes. Note that there doesn't seem to be any way to squelch this warning, either (e.g. a -Wno-warning-not-applicable option or similar.) cc1plus: warning: command-line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++