I want to save any other -Wpedantic checks, but lose the warning about unnamed error: ISO C++ prohibits anonymous structs [-Wpedantic] structures error: ISO C++ prohibits anonymous structs [-Wpedantic] .
I want to be able to do the following:
union { struct { float x, y, z, w; }; struct { float r, g, b, a; }; float v[4]; };
What i have found so far
I'm using C ++ 11 and compiled with the flag -std=c++11 . I read that C11 supports this function , but I did not see mention that it is supported in C ++ 11.
I came across the mention of -fms-extensions :
I tried the flag and it seems to have no effect (regardless of the rearrangement of the order between -fms-extensions and -Wpedantic ).
EDIT - More Info
Thanks to the comments, I found the following:
I would still like to know if there is a way to enable this gcc extension (which all compilers know to me) will turn off the warning. Or -Wpedantic all or nothing?
c ++ gcc c ++ 11
peter Clark
source share