public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107764] New: -Wreturn-type and -Wuninitialized documentation could link to a FAQ about enum and switches
@ 2022-11-19 19:42 pinskia at gcc dot gnu.org
2022-11-19 20:23 ` [Bug c++/107764] " pinskia at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-19 19:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107764
Bug ID: 107764
Summary: -Wreturn-type and -Wuninitialized documentation could
link to a FAQ about enum and switches
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: documentation
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
I have noticed GCC gets bug reports about false positive with -Wreturn-type or
-Wuninitialized and enums in a switch statement. WE should have a FAQ about
enums dealing with how they work; especially with switch statements and link to
that part of the document from those two warnings.
And also the FAQ should talk about the interaction with -fstrict-enum option
for C++.
https://gcc.gnu.org/legacy-ml/gcc/2007-01/msg01179.html
There are definitely some more bug reports that I didn't link in the see also.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/107764] -Wreturn-type and -Wuninitialized documentation could link to a FAQ about enum and switches
2022-11-19 19:42 [Bug c++/107764] New: -Wreturn-type and -Wuninitialized documentation could link to a FAQ about enum and switches pinskia at gcc dot gnu.org
@ 2022-11-19 20:23 ` pinskia at gcc dot gnu.org
2022-11-21 4:19 ` 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-11-19 20:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107764
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
It also does not help that clang and GCC disagree on how the C++ enums work
either.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/107764] -Wreturn-type and -Wuninitialized documentation could link to a FAQ about enum and switches
2022-11-19 19:42 [Bug c++/107764] New: -Wreturn-type and -Wuninitialized documentation could link to a FAQ about enum and switches pinskia at gcc dot gnu.org
2022-11-19 20:23 ` [Bug c++/107764] " pinskia at gcc dot gnu.org
@ 2022-11-21 4:19 ` egallager at gcc dot gnu.org
2022-11-21 10:16 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: egallager at gcc dot gnu.org @ 2022-11-21 4:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107764
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-11-21
CC| |egallager at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #2 from Eric Gallager <egallager at gcc dot gnu.org> ---
Yeah this is definitely one I've noticed before; confirmed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/107764] -Wreturn-type and -Wuninitialized documentation could link to a FAQ about enum and switches
2022-11-19 19:42 [Bug c++/107764] New: -Wreturn-type and -Wuninitialized documentation could link to a FAQ about enum and switches pinskia at gcc dot gnu.org
2022-11-19 20:23 ` [Bug c++/107764] " pinskia at gcc dot gnu.org
2022-11-21 4:19 ` egallager at gcc dot gnu.org
@ 2022-11-21 10:16 ` redi at gcc dot gnu.org
2022-11-21 10:17 ` redi at gcc dot gnu.org
2022-11-22 8:40 ` marxin at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2022-11-21 10:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107764
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
We do have a FAQ, I wrote one:
https://gcc.gnu.org/wiki/VerboseDiagnostics#enum_switch
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/107764] -Wreturn-type and -Wuninitialized documentation could link to a FAQ about enum and switches
2022-11-19 19:42 [Bug c++/107764] New: -Wreturn-type and -Wuninitialized documentation could link to a FAQ about enum and switches pinskia at gcc dot gnu.org
` (2 preceding siblings ...)
2022-11-21 10:16 ` redi at gcc dot gnu.org
@ 2022-11-21 10:17 ` redi at gcc dot gnu.org
2022-11-22 8:40 ` marxin at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2022-11-21 10:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107764
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It could be moved to https://gcc.gnu.org/bugs/#nonbugs_cxx though, if we want
to link to it from diagnostics.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/107764] -Wreturn-type and -Wuninitialized documentation could link to a FAQ about enum and switches
2022-11-19 19:42 [Bug c++/107764] New: -Wreturn-type and -Wuninitialized documentation could link to a FAQ about enum and switches pinskia at gcc dot gnu.org
` (3 preceding siblings ...)
2022-11-21 10:17 ` redi at gcc dot gnu.org
@ 2022-11-22 8:40 ` marxin at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-11-22 8:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107764
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Or it can be even includeded in
https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Misunderstandings.html#C_002b_002b-Misunderstandings
(or next to -Wreturn-type and -Wuninitialized).
Well, our documentation effort is really discrete :/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-11-22 8:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-19 19:42 [Bug c++/107764] New: -Wreturn-type and -Wuninitialized documentation could link to a FAQ about enum and switches pinskia at gcc dot gnu.org
2022-11-19 20:23 ` [Bug c++/107764] " pinskia at gcc dot gnu.org
2022-11-21 4:19 ` egallager at gcc dot gnu.org
2022-11-21 10:16 ` redi at gcc dot gnu.org
2022-11-21 10:17 ` redi at gcc dot gnu.org
2022-11-22 8:40 ` marxin at gcc dot gnu.org
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).