Has anyone else experienced this weird bug, occurring after upgrade to the new XCode 2.1:

System:
    OS X Tiger (10.4.1)
    iMac G4 700MHz
XCode 2.1 (actually, using gcc from command line, but.. does it matter)

If -ffast-math is given to gcc, it #defines floor[f] and ceil[f] to __fastmath_floor[f] and so. These are inline functions that treat -0.0 in a non-standard way. So what..

For me, in some places, floorf(0.7)==0.7 ! That's no use. Weird thing is, that this is not consistent, some places work, others don't. Possibly some variable assignment/code generation/whatever weirdness?

Anyway, I did not have this (same code) before running XCode 2.1, so clearly there's something wrong.

If some of you would have XCode 2.0, please send /usr/include/ architecture/ppc/math.h so I can compare them. It may be the function hasn't changed, but gcc code generation has, though.

First aid: just stop using '-ffast-math' or #undef the macros it defines. Regular libm functions will be used, and they work. :)

-ak



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to