[PPL-devel] IEEE inexact-flag not working on the Alpha (despite -mieee-with-inexact)?

Tim Prince TimothyPrince at sbcglobal.net
Thu Sep 18 17:11:35 CEST 2008


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?




More information about the PPL-devel mailing list