Re: const volatile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/28/2018 01:03 PM, Rob wrote:
> If it helps, this is likely related to a bugfix that went into freebsd's libm a
> while back after they switched to clang. I can't remember the details, but I
> believe the bug was to do with clang incorrectly constant-folding floating
> point expressions in the wrong rounding mode, or perhaps how it interacted with
> fesetround() and the fenv access pragmas.
> 
> The mirror here [1] shows the fix.

Yeah, I see. It's about setting the flags in the FPU so that the
division by zero is delayed to runtime rather than evaluated as
a constant by the compiler.

-		return -two25/zero;		/* log(+-0)=-inf */
+		return -two25/vzero;		/* log(+-0)=-inf */

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux