[Bug c/26005] Non-existent function/macro isinf() - correctly rejected by gcc - accepted by gcc -O

dbb at hadenmead dot com gcc-bugzilla@gcc.gnu.org
Sat Jan 28 21:31:00 GMT 2006



------- Comment #4 from dbb at hadenmead dot com  2006-01-28 21:30 -------
Sorry, I must ask you to help me here.

The function [macro] isinf() is not declared [or defined] in any of the
Solaris9 include files (the nearest it comes is in /usr/include/ieefp.h, which
defines the function finite(), usually one of the same family as isinf()).  Nor
is it defined [declared] in any of the include files created during the gcc
build/install process. Presumably this is why the specimen code isinf() will
not compile under gcc3.3.2 with either 'gcc' or 'gcc -O[23]'.

Yet such code DOES compile  with gcc -O under gcc4.0.2. However, the following
does not compile, with or without -O :-

int something(float f)
{
        f = f*f ;
}
int main ()
{
 float f ;

 if(isinf(f))
        return 1 ;
 else
        return 2 ;
 return 0;
}

Here, the optimiser is obviously unable to make assumptions about the value
that would be returned by isinf() if the function were present, and the code is
rejected.

This 'bug' breaks autoconf tests for the presence of isinf()


-- 

dbb at hadenmead dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dbb at hadenmead dot com
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26005



More information about the Gcc-bugs mailing list