struct foo { int x; int y; }; int main() { struct foo a = {.y=10, .x=0 }; }
Standard input is empty
prog.cpp: In function ‘int main()’:
prog.cpp:8:30: error: designator order for field ‘foo::x’ does not match declaration order in ‘foo’
struct foo a = {.y=10, .x=0 };
^
Standard output is empty