I just ran across a compiler bug when dealing with long long in the GCC shipped with Mandrake 8.0 (Intel). When -O2 is specified (it's in the default), it seems to lose the upper 32 bits of the 64 bit integers. (I was playing with the XML code in apr-util and the return values from elem_size() were corrupted.) Removing -O2 fixes this.
% gcc -v Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.96/specs gcc version 2.96 20000731 (Linux-Mandrake 8.0 2.96-0.48mdk) This is a fairly old snapshot. I am building gcc-3.0 now and going to see if the problem still exists (unlikely). Even if it doesn't, we probably need to stick something in autoconf to avoid optimizations with this buggy compiler. Silly distros shipping beta compilers (2.96 was never a released version). This is lame. Thoughts? Should we just avoid this problem and tell anyone using a default install of Mandrake that they are screwed? Or, do we just disable compiler optimizations with gcc 2.96? -- justin
