shadowm icon

Untitled

shadowm | PRO | 09/14/16 07:26:57 AM UTC | 0 ⭐ | 308 👁️ | Never ⏰ | []
text |

530 B

|

None

|

0 👍

/

0 👎

shadowm@nanacore ~ % cat test.cpp
#include <iostream>
 struct Foo
{
        int a, b, c;
};
 int main(int, char**)
{
        Foo f = { .a = 42};
        std::cerr << f.a << ' ' << f.b << '\n';
        return 0;
}
shadowm@nanacore ~ % g++-6 test.cpp -o test -std=c++98 && echo OK
OK
shadowm@nanacore ~ % g++-5 test.cpp -o test -std=c++98 && echo OK
OK
shadowm@nanacore ~ % g++-4.4 test.cpp -o test -std=c++98
test.cpp: In function ‘int main(int, char**)’:
test.cpp:10: error: expected primary-expression before ‘.’ token

Comments