This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



------- Comment #6 from ebotcazou at gcc dot gnu dot org  2006-01-28 21:44 -------
> 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()

Then autoconf should be more clever, for example by compiling w/o optimization
or by using a robust test or by passing -fno-builtin to the compiler.  


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]