Le 02/02/2010 22:53, Helmut Karlowski a écrit :
That's nice. I compiled the current kernel with gcc 2.95 and got compiler-errors on some statements that where new to me. For example: { union{ char *s, long l] u; u.s = x; long z; ... } That's not C as I know it. I thought gcc 2.95 is C99.
There are 2 typos in your quote. This is an unnamed union, it is a Microsoft extension supported by GCC. This kind of extension should not be used in serious software. We should compile with -ansi -pedantic to forbid these extensions.Except inline assembly and __attribute__ that should be put inside ifdefs, a C code which compiles well with GCC and the options specified above should compile on any other compiler.
-- Vincent Rivière