Eric Botcazou wrote on 14/07/2005 08:59:53: > The compiler knows the answer of isinf (0) so it again optimizes away the > call. Try something like: > > int a; > > int > main (int argc, char *argv[]) > { > a = isinf ((double) argc); > return 0; > } This may work today, but and still break in the future. This will not work (possibly) years from now when gcc will start doing VRP on math functions like isinf. MIN_INT <= argc <= MAX_INT falls well into representable values of double (assuming 32 bit int or less). This means that the compiler may deduce that isinf((double)argc) always returns false, without ever calling the function. > > or additionally compile with -fno-builtin. That may help.