https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102820
Bug ID: 102820 Summary: Failure to compile void{} Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gabravier at gmail dot com Target Milestone: --- void f() { void{}; } This has been considered valid since http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2351 was accepted as a DR in 2018, but GCC fails to compile it, with this error: <source>: In function 'void f()': <source>:3:10: error: compound literal of non-object type 'void' 3 | void{}; | ^