This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: IEEE inexact-flag not working on the Alpha (despite -mieee-with-inexact)?


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?


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