gcc will warn about the following example code:
struct someStruct {
char c;
int i;
};
int main() {
someStruct s { 'a', 3 };
return 0;
}
warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x
I want to make my code compatible to older compilers having no C++11 support.
Now when I try to compile it with either -std=c++98 or even -ansi -pedantic it still issues the same warning and compiles.
Is this a compiler bug or am I missing something?
You’re missing an
=: