Oh, but the plot thickens. I am probably missing some obvious text in the standard, as the online Comeau compiler tells me:
Code:
Comeau C/C++ 4.3.9 (Mar 27 2007 17:24:47) for ONLINE_EVALUATION_BETA1
Copyright 1988-2007 Comeau Computing. All rights reserved.
MODE:strict errors C++ C++0x_extensions
"ComeauTest.c", line 9: error: extra braces are nonstandard
Test test = {1, {2}};
^
"ComeauTest.c", line 9: warning: variable "test" was declared but never referenced
Test test = {1, {2}};
^
1 error detected in the compilation of "ComeauTest.c".
For the test code:
Code:
struct Test
{
int x;
int y;
};
int main()
{
Test test = {1, {2}};
}