This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: optimization/576: gcc performs invalid optimization with floatoperations.


The following reply was made to PR optimization/576; it has been noted by GNATS.

From: "Joseph S. Myers" <jsm28@cam.ac.uk>
To: goualard@cwi.nl
Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Subject: Re: optimization/576: gcc performs invalid optimization with float
 operations.
Date: Thu, 28 Sep 2000 16:33:45 +0100 (BST)

 On 28 Sep 2000 goualard@cwi.nl wrote:
 
 > gcc performs optimizations that are invalid for some
 > floating-point computations when the rounding direction
 > is set towards +infinity or -infinity. As shown in
 > the code example, trivial identities do no longer hold.
 
 For this to work properly, according to the C99 standard you must use
 "#pragma STDC FENV_ACCESS ON".  GCC does not yet support the C99 standard
 pragmas, but hopefully it will do so in future.  (Note also that using the
 <fenv.h> function fesetround() is more portable than using an asm.)  This
 should for now be considered a missing feature in GCC (documented as
 missing at http://gcc.gnu.org/c99status.html).  See
 http://gcc.gnu.org/contribute.html and
 http://gcc.gnu.org/contributewhy.html if you want to contribute an
 implementation; I don't know if anyone is working on this.
 
 -- 
 Joseph S. Myers
 jsm28@cam.ac.uk
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]