From: Stefanos A. <sta...@gm...> - 2008-08-24 14:16:11
|
On Sun, Aug 24, 2008 at 6:31 AM, Branan Riley <br...@gm...> wrote: > Could be a different version of MSVC giving different > warnings. Actually no, just stricter warnings (warning level 4, where the default is 3). GCC doesn't produce any warnings even with -Wall. However, please note that the anonymous union is *not* valid C89 (fails to compile with "gcc -ansi"). I'm not saying this is a problem (//-style comments aren't valid C89 either), just something to keep in mind and document. // Not valid C89 union { float data[2]; struct { float x, y; }; }; /* Valid C89 */ union foo_union { float data[2]; struct bar_struct { float x, y; } bar; } foo; Anyone knows if these have been standardized in C99? |