mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH] Error when built with -ffast-math.
Date: Fri, 31 Oct 2014 14:16:02 -0400	[thread overview]
Message-ID: <20141031181602.GE22465@brightrain.aerifal.cx> (raw)
In-Reply-To: <1414778845-11512-1-git-send-email-ibid.ag@gmail.com>

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.

Rich


      reply	other threads:[~2014-10-31 18:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 18:07 Isaac Dunham
2014-10-31 18:16 ` Rich Felker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141031181602.GE22465@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).