This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: What is acceptable for -ffast-math? (Was: associative law incombine)
- To: Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: What is acceptable for -ffast-math? (Was: associative law incombine)
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Tue, 31 Jul 2001 01:21:05 +0100 (BST)
- cc: <gcc at gcc dot gnu dot org>
On 30 Jul 2001, Alexandre Oliva wrote:
> Would you prefer
>
> __extension__ __attribute__ ((optimize=0)) (a*b) +
> __extension__ __attribute__ ((optimize=0)) (a*c)
>
> ? :-)
>
> I'd much rather write ((a*b)) + ((a*c)), which will even compile with
> other compilers, and might be picked up in a future revision of the C
> and C++ Standards.
I'd rather you use #pragma STDC FP_CONTRACT OFF - while this seems to be
intended to disable optimisations that give more accurate results, it
should probably disable optimisations here that may give less accurate
results as well.
--
Joseph S. Myers
jsm28@cam.ac.uk