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.