https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123805
Bug ID: 123805
Summary: Parentheses aggregate initialization incorrectly
rejected when self referencing
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: luigighiron at gmail dot com
Target Milestone: ---
The following code is incorrectly rejected by GCC:
int main(){
void*a[1](a);
}
This error seems specific to naming a in the initializer, replacing (a) with
(nullptr) makes the error go away. Clang and MSVC accept this.