[Bug c/17778] regression in evaluating long double hexadecimal constants

das at FreeBSD dot ORG gcc-bugzilla@gcc.gnu.org
Fri Oct 1 17:16:00 GMT 2004


------- Additional Comments From das at FreeBSD dot ORG  2004-10-01 17:15 -------
Subject: Re:  regression in evaluating long double hexadecimal constants

On Fri, Oct 01, 2004, pinskia at gcc dot gnu dot org wrote:
> 
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-01 17:04 -------
> I cannot reproduce this on the mainline or on 3.4.0 on i686-pc-linux, maybe this is a difference 
> between Linux and freebsd depending on the rounding mode (or precision set to 80bits).
> 
> I really think this is OS problem rather than a GCC problem.

Thanks for the quick response.  Linux sets the i386 FPU to
extended precision, which avoids this bug but leads to other
problems.  So you're right that the bug won't appear on Linux, but
it isn't an OS problem, it's a gcc problem.  gcc is supposed to
understand the native precision used in the target environment and
round floating-point constant expressions to that precision.  This
used to work, and it almost works now, but as of gcc 3.4, an extra
bit is set in the mantissa of long doubles.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17778



More information about the Gcc-bugs mailing list