This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: IEEE inexact-flag not working on the Alpha (despite -mieee-with-inexact)?
- From: Tim Prince <TimothyPrince at sbcglobal dot net>
- To: Roberto Bagnara <bagnara at cs dot unipr dot it>
- Cc: gcc at gcc dot gnu dot org, The Parma Polyhedra Library developers' list <ppl-devel at cs dot unipr dot it>
- Date: Thu, 18 Sep 2008 08:11:35 -0700
- Subject: Re: IEEE inexact-flag not working on the Alpha (despite -mieee-with-inexact)?
- References: <48D23D14.2030006@cs.unipr.it>
- Reply-to: tprince at computer dot org
Roberto Bagnara wrote:
> #include <fenv.h>
> #include <cstdio>
>
> int main() {
> float x = 2;
> float y = 3;
> feclearexcept(FE_INEXACT);
> x = x / y;
> printf("%d %.1000g\n", fetestexcept(FE_INEXACT) != 0, x);
> }
Is this a way of testing whether the division is performed at compile
time? Do you call it a bug if constant propagation occurs when you don't
take action to prevent it?