public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106486] New: C++ warning for -Wmissing-prototypes is pure nuisance
@ 2022-07-30 22:31 hpa at zytor dot com
  2022-07-30 22:34 ` [Bug c++/106486] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: hpa at zytor dot com @ 2022-07-30 22:31 UTC (permalink / raw)
  To: gcc-bugs

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++

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-05 19:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-30 22:31 [Bug c++/106486] New: C++ warning for -Wmissing-prototypes is pure nuisance hpa at zytor dot com
2022-07-30 22:34 ` [Bug c++/106486] " pinskia at gcc dot gnu.org
2022-07-31 14:29 ` egallager at gcc dot gnu.org
2022-08-01  9:16 ` rguenth at gcc dot gnu.org
2022-08-01 10:40 ` redi at gcc dot gnu.org
2023-06-05 19:58 ` hpa at zytor dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).