isfinite macro defined for 4.4.1 but not for 4.3.3

Bug #512741 reported by Mateusz Łoskot on 2010-01-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-4.3 (Ubuntu)

Bug Description

Binary package hint: gcc-4.3

Originally, I reported this problem to GCC team (, but I was explained I should report it to Ubuntu team first as Ubuntu uses modified version of GCC and glibc. So, here we go:

The problem is that the definition of isfinite() macro is not consistent
between version of GCC 4.3.3 and GCC 4.4.1 (so, it is related to package of GCC 4.4 in Ubuntu 9.10 as well)

Simple test program:

include <math.h>
#ifdef isfinite
#error isfinite defined
#error isfinite NOT defined
int main() { return 0; }

1) Test with GCC 4.4.1 (Ubuntu 9.10 x86-64)

mloskot@dog:~/tmp$ gcc --version
gcc (Ubuntu 4.4.1-4ubuntu9) 4.4.1

mloskot@dog:~/tmp$ gcc isfinite.c
isfinite.c:3:2: error: #error isfinite defined

2) Test with GCC 4.3.3 (Ubuntu 9.04 x86-32)

mloskot@vb-ubuntu904:~/tmp$ gcc --version
gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3

mloskot@vb-ubuntu904:~/tmp$ gcc isfinite.c
isfinite.c:5:2: error: #error isfinite NOT defined

In the 2nd case, it seems to be required to use compiler option -std=c99 to
enable the macro:

mloskot@vb-ubuntu904:~/tmp$ gcc -std=c99 isfinite.c
isfinite.c:3:2: error: #error isfinite defined

I think the behaviour of version 4.3.3. is incorrect.

I didn't find any related reports in GCC Bugzilla except the one for C++ use of iostream.h
together with math.h (
But I am sure it is not related to this report.

Matthias Klose (doko) wrote :

not reproducible anymore with lucid's gcc-4.3 and gcc-4.4

Changed in gcc-4.3 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers