public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104093] New: Make -Wvexing-parse warn on declaration of void functions as well
@ 2022-01-18 11:23 doodspav at gmail dot com
2022-01-18 14:11 ` [Bug c++/104093] " mpolacek at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: doodspav at gmail dot com @ 2022-01-18 11:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104093
Bug ID: 104093
Summary: Make -Wvexing-parse warn on declaration of void
functions as well
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: doodspav at gmail dot com
Target Milestone: ---
Right now G++ with -Wvexing-parse will warn about this:
void fn() {
int x();
}
but not this:
void fn() {
void x();
}
While the former is much more likely to occur than the latter, I have seen the
latter happen in practice and it would be nice for the warning to cover this
too.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/104093] Make -Wvexing-parse warn on declaration of void functions as well
2022-01-18 11:23 [Bug c++/104093] New: Make -Wvexing-parse warn on declaration of void functions as well doodspav at gmail dot com
@ 2022-01-18 14:11 ` mpolacek at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-01-18 14:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104093
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |WONTFIX
CC| |mpolacek at gcc dot gnu.org
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I did this intentionally; you can't have a variable of type void, so there's no
ambiguity. So I don't plan to change this, sorry.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-18 14:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18 11:23 [Bug c++/104093] New: Make -Wvexing-parse warn on declaration of void functions as well doodspav at gmail dot com
2022-01-18 14:11 ` [Bug c++/104093] " mpolacek 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).