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
* [Bug c++/106486] C++ warning for -Wmissing-prototypes is pure nuisance
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 ` pinskia at gcc dot gnu.org
2022-07-31 14:29 ` egallager at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-07-30 22:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106486
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> which is often painful to do without structural Makefile changes.
Not true. Most makefiles have CFLAGS and CXXFLAGS. And then use a common
OPTFLAGS or something similar. It seems like setting CXXFLAGS directly to
CFLAGS is wrong.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/106486] C++ warning for -Wmissing-prototypes is pure nuisance
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
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: egallager at gcc dot gnu.org @ 2022-07-31 14:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106486
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |egallager at gcc dot gnu.org
--- Comment #2 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to H. Peter Anvin from comment #0)
> 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.)
I think clang puts it under -Wunknown-warning-option, IIRC...
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/106486] C++ warning for -Wmissing-prototypes is pure nuisance
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
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-08-01 9:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106486
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-08-01
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. Note that in C++ we effectively have -Werror=missing-prototypes so
maybe we can simply accept -Wmissing-prototypes (but reject
-Wno-missing-prototypes?)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/106486] C++ warning for -Wmissing-prototypes is pure nuisance
2022-07-30 22:31 [Bug c++/106486] New: C++ warning for -Wmissing-prototypes is pure nuisance hpa at zytor dot com
` (2 preceding siblings ...)
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
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2022-08-01 10:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106486
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
You mean accept -Wmissing-prototypes and silently ignore it (because it's
already an error)?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/106486] C++ warning for -Wmissing-prototypes is pure nuisance
2022-07-30 22:31 [Bug c++/106486] New: C++ warning for -Wmissing-prototypes is pure nuisance hpa at zytor dot com
` (3 preceding siblings ...)
2022-08-01 10:40 ` redi at gcc dot gnu.org
@ 2023-06-05 19:58 ` hpa at zytor dot com
4 siblings, 0 replies; 6+ messages in thread
From: hpa at zytor dot com @ 2023-06-05 19:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106486
--- Comment #5 from H. Peter Anvin <hpa at zytor dot com> ---
Yes, exactly.
^ 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).