Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Oct 2002 03:26:23 -0800
From:      David Schultz <dschultz@uclink.Berkeley.EDU>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        "M. Warner Losh" <imp@bsdimp.com>, tlambert2@mindspring.com, rittle@labs.mot.com, rittle@latour.rsch.comm.mot.com, current@FreeBSD.ORG
Subject:   Re: Lack of real long double support
Message-ID:  <20021031112623.GA28135@HAL9000.homeunix.com>
In-Reply-To: <20021031202343.W8632-100000@gamplex.bde.org>
References:  <20021030.170154.35505346.imp@bsdimp.com> <20021031202343.W8632-100000@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake Bruce Evans <bde@zeta.org.au>:
> $ 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 majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021031112623.GA28135>