Thus spake Bruce Evans <[EMAIL PROTECTED]>: > $ cc -o z z.c > $ ./z > LDBL_EPSILON failed test 1 with prec 2 > $ cc -O -o z z.c. > $ ./z > LDBL_EPSILON failed test 1 with prec 2 > DBL_EPSILON failed test 2 with prec 3 > %%% > > The full brokenness only shows up with -O.
Actually, the _full_ brokenness of floating point in FreeBSD shows up only with -O2. :-( A number of library functions (e.g. isinf()) use unions for type punning, which violates C's aliasing rules. It turns out that there's a bad interaction between gcc3's -fschedule-insns and -fstrict-aliasing (both implied by -O2) that can cause problems. The best fix I know of is to use unions in the limited way that gcc's optimizer knows how to handle in a reasonable way. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message