This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

[PATCH] Another huge_val.h fix


Hi!

Sadly it turns out that eventhough gcc 2.95 handles hex floating constants
just fine (with __extension__ for -pedantic), g++ 2.95 does not, so everyone
now gets a fatal error including math.h in a C++ program.
Fortunately g++ 2.96 does (ObjC did already in 2.95), so IMHO we have three
choices:
- simply prereq 2.96 like done with this patch
- use # if __GNUC_PREREQ(2,96) || (__GNUC_PREREQ(2,95) && !defined(__cplusplus))
- kill the hex floating consts bits from huge_val.h

2000-05-21  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/arm/bits/huge_val.h: Prereq gcc 2.96+, not 2.95.
	* sysdeps/i386/bits/huge_val.h: Likewise.
	* sysdeps/ieee754/bits/huge_val.h: Likewise.
	* sysdeps/m68k/bits/huge_val.h: Likewise.
	* sysdeps/sparc/sparc32/bits/huge_val.h: Likewise.
	* sysdeps/sparc/sparc64/bits/huge_val.h: Likewise.

--- libc/sysdeps/arm/bits/huge_val.h.jj	Thu May 18 14:49:54 2000
+++ libc/sysdeps/arm/bits/huge_val.h	Sun May 21 06:23:09 2000
@@ -29,7 +29,7 @@
 
 #ifdef	__GNUC__
 
-# if __GNUC_PREREQ(2,95)
+# if __GNUC_PREREQ(2,96)
 
 #  define HUGE_VAL (__extension__ 0x1.0p2047)
 
@@ -67,7 +67,7 @@ static __huge_val_t __huge_val = { __HUG
 
 # ifdef __GNUC__
 
-#  if __GNUC_PREREQ(2,95)
+#  if __GNUC_PREREQ(2,96)
 
 #   define HUGE_VALF (__extension__ 0x1.0p255f)
 
--- libc/sysdeps/i386/bits/huge_val.h.jj	Thu May 18 14:50:03 2000
+++ libc/sysdeps/i386/bits/huge_val.h	Sun May 21 06:23:09 2000
@@ -26,7 +26,7 @@
 
 /* IEEE positive infinity (-HUGE_VAL is negative infinity).  */
 
-#if __GNUC_PREREQ(2,95)
+#if __GNUC_PREREQ(2,96)
 # define HUGE_VAL	(__extension__ 0x1.0p2047)
 #else
 # define __HUGE_VAL_bytes	{ 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
@@ -46,7 +46,7 @@ static __huge_val_t __huge_val = { __HUG
 
 #ifdef __USE_ISOC99
 
-# if __GNUC_PREREQ(2,95)
+# if __GNUC_PREREQ(2,96)
 
 #  define HUGE_VALF (__extension__ 0x1.0p255f)
 #  define HUGE_VALL (__extension__ 0x1.0p32767L)
--- libc/sysdeps/ieee754/bits/huge_val.h.jj	Thu May 18 14:50:05 2000
+++ libc/sysdeps/ieee754/bits/huge_val.h	Sun May 21 06:23:09 2000
@@ -28,7 +28,7 @@
 
 #ifdef	__GNUC__
 
-# if __GNUC_PREREQ(2,95)
+# if __GNUC_PREREQ(2,96)
 
 #  define HUGE_VAL (__extension__ 0x1.0p2047)
 
@@ -66,7 +66,7 @@ static __huge_val_t __huge_val = { __HUG
 
 # ifdef __GNUC__
 
-#  if __GNUC_PREREQ(2,95)
+#  if __GNUC_PREREQ(2,96)
 
 #   define HUGE_VALF (__extension__ 0x1.0p255f)
 
--- libc/sysdeps/m68k/bits/huge_val.h.jj	Thu May 18 14:50:07 2000
+++ libc/sysdeps/m68k/bits/huge_val.h	Sun May 21 06:23:09 2000
@@ -30,7 +30,7 @@
 
 #ifdef	__GNUC__
 
-# if __GNUC_PREREQ(2,95)
+# if __GNUC_PREREQ(2,96)
 
 #  define HUGE_VAL (__extension__ 0x1.0p2047)
 
@@ -56,7 +56,7 @@ static union { unsigned char __c[8]; dou
 
 #ifdef __USE_ISOC99
 
-# if __GNUC_PREREQ(2,95)
+# if __GNUC_PREREQ(2,96)
 
 #  define HUGE_VALF (__extension__ 0x1.0p255f)
 #  define HUGE_VALL (__extension__ 0x1.0p32767L)
--- libc/sysdeps/sparc/sparc32/fpu/bits/huge_val.h.jj	Thu May 18 14:50:19 2000
+++ libc/sysdeps/sparc/sparc32/fpu/bits/huge_val.h	Sun May 21 06:23:09 2000
@@ -29,7 +29,7 @@
 
 #ifdef	__GNUC__
 
-# if __GNUC_PREREQ(2,95)
+# if __GNUC_PREREQ(2,96)
 
 #  define HUGE_VAL (__extension__ 0x1.0p2047)
 
@@ -58,7 +58,7 @@ static __huge_val_t __huge_val = { __HUG
 
 #ifdef __USE_ISOC99
 
-# if __GNUC_PREREQ(2,95)
+# if __GNUC_PREREQ(2,96)
 
 #  define HUGE_VALF (__extension__ 0x1.0p255f)
 #  if __WORDSIZE == 32
--- libc/sysdeps/sparc/sparc64/fpu/bits/huge_val.h.jj	Thu May 18 14:50:21 2000
+++ libc/sysdeps/sparc/sparc64/fpu/bits/huge_val.h	Sun May 21 06:23:09 2000
@@ -29,7 +29,7 @@
 
 #ifdef	__GNUC__
 
-# if __GNUC_PREREQ(2,95)
+# if __GNUC_PREREQ(2,96)
 
 #  define HUGE_VAL (__extension__ 0x1.0p2047)
 
@@ -58,7 +58,7 @@ static __huge_val_t __huge_val = { __HUG
 
 #ifdef __USE_ISOC99
 
-# if __GNUC_PREREQ(2,95)
+# if __GNUC_PREREQ(2,96)
 
 #  define HUGE_VALF (__extension__ 0x1.0p255f)
 #  if __WORDSIZE == 32

	Jakub

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