Aha, I see the problem now, I'll go fix my code. Not entirely obvious to a novice like me...
Perhaps GCC should not accept code that will result in undefined behaviour (that is with -fstrict-aliasing, -Wstrict-aliasing should be automatically enabled and any such warnings should be considered errors)? I think the current behaviour is a bit dangerous, since the code works in previous versions of GCC, and with other compilers, and that the current compiler does accept the code although it knows that it will probably do wrong. /Anders Torger On Tuesday 09 November 2004 17.26, Andreas Schwab wrote: > Anders Torger <[EMAIL PROTECTED]> writes: > > Compiler makes same mistake > > Fix your code. > > > the only difference is the warning > > Which is the whole point. Your example is violating the strict > aliasing rules and thus invoking undefined behaviour. > > http://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc/Optimize-Options.html#ind >ex-fstrict_002daliasing-422 > > Andreas.