This fails: #include <assert.h> #include <limits.h> #include <errno.h> #include <stdio.h> #include <float.h> #include <fenv.h> #include <math.h> /* glibc 2.41-11 */ #pragma STDC FENV_ACCESS ON #pragma STDC FP_CONTRACT OFF #pragma STDC FENV_ROUND FE_TONEAREST #pragma STDC FENV_DEC_ROUND FE_DEC_TONEAREST #pragma STDC CX_LIMITED_RANGE OFF int main(void){ if(1){ int d7; int flags; d7 = ( 1, (0./0.), 0 ); /* should raise invalid */ flags = fetestexcept( FE_ALL_EXCEPT ); assert( 0 == d7 ); assert( 0 != flags ); /* fails here */ } return 0; }
Still because we don't support FENV_ACCESS yet. *** This bug has been marked as a duplicate of bug 34678 ***