This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/26005] Non-existent function/macro isinf() - correctly rejected by gcc - accepted by gcc -O
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2006 21:44:22 -0000
- Subject: [Bug c/26005] Non-existent function/macro isinf() - correctly rejected by gcc - accepted by gcc -O
- References: <bug-26005-12086@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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