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?