http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60859
Bug ID: 60859
Summary: Value-initialization of scalar in aggregate yields
"braces around scalar initializer"
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: potswa at mac dot com
GCC incorrectly rejects this value-initialization of an array element:
int a[] = { {} }; // error: braces around scalar initializer for type ‘int’
Clang accepts it, and furthermore if the error is realized by changing the code
to {0}, only emits a warning. Generating a warning seems more reasonable than a
hard error.