modernc.org/cc@v1.0.1/v2/testdata/bug/11.c (about)

     1  int __isnan(double) {}
     2  int __isnanf(float) {}
     3  int __isnanl(long double) {}
     4  
     5  #define __typeof__ typeof
     6  #define __dfp_expansion(__call, __fin, x) __fin
     7  #define __mingw_choose_expr __builtin_choose_expr
     8  #define __mingw_types_compatible_p(type1, type2) __builtin_types_compatible_p ( type1 , type2 )
     9  #define isnan(x) __mingw_choose_expr ( __mingw_types_compatible_p ( __typeof__ ( x ) , double ) , __isnan ( x ) , __mingw_choose_expr ( __mingw_types_compatible_p ( __typeof__ ( x ) , float ) , __isnanf ( x ) , __mingw_choose_expr ( __mingw_types_compatible_p ( __typeof__ ( x ) , long double ) , __isnanl ( x ) , __dfp_expansion ( __isnan , ( __builtin_trap ( ) , x ) , x ) ) ) )
    10  
    11  int main() {
    12  	float f;
    13  	double d;
    14  	long double l;
    15  	isnan(f);
    16  	isnan(d);
    17  	isnan(l);
    18  }