Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 31 Oct 2014 14:16:02 -0400
From: Rich Felker <>
Subject: Re: [PATCH] Error when built with -ffast-math.

On Fri, Oct 31, 2014 at 11:07:25AM -0700, Isaac Dunham wrote:
> There was a bug report from someone who turned it on without knowing this.
> ---
>  src/internal/libm.h | 4 ++++
>  1 file changed, 4 insertions(+)
> diff --git a/src/internal/libm.h b/src/internal/libm.h
> index ebcd784..f8afe5d 100644
> --- a/src/internal/libm.h
> +++ b/src/internal/libm.h
> @@ -19,6 +19,10 @@
>  #include <complex.h>
>  #include <endian.h>
> +#ifdef __FAST_MATH__
> +#error Using -ffast-math to compile libc will break
> +#endif
> +

It may be desirable to catch broken build configurations (in fact
we're already doing it for wrong long double type), but if we want to
expand this perhaps it should be unified in one place rather than
spread out.

Also I'm not clear whether the problem is the -ffast-math option
itself. From what I can tell, it's just a meta option that turns on
other options, and turning on these options individually without using
-ffast-math would equally break things.

I'm not rejecting this but I think we should discuss it a bit first
and find the best way to catch problems like this if we're going to.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.