https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108591
Bug ID: 108591
Summary: void{} does not error out in 12.1
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: Mark_B53 at yahoo dot com
Target Milestone: ---
void fn1() {
return void{}; // fails in gcc 11.3, passes in gcc 12.1
}
void fn2() {
return void(); // passes in both gcc 11.3 and gcc 12.1
}
I would not have expected fn1 to be legal C++.
