[Bug 512741] [NEW] isfinite macro defined for 4.4.1 but not for 4.3.3

Mateusz Łoskot mateusz at loskot.net
Tue Jan 26 10:58:57 UTC 2010


Public bug reported:

Binary package hint: gcc-4.3

Originally, I reported this problem to GCC team
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42867), 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
#else
#error isfinite NOT defined
#endif
int main() { return 0; }


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

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

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


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

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

mloskot at 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 at 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 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14608).
But I am sure it is not related to this report.

** Affects: gcc-4.3 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: gcc-4.3 gcc-4.4 libc6

-- 
isfinite macro defined for 4.4.1 but not for 4.3.3
https://bugs.launchpad.net/bugs/512741
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list