]> sourceware.org Git - glibc.git/commitdiff
2002-01-03 Paul Eggert <eggert@twinsun.com>
authorRoland McGrath <roland@gnu.org>
Sat, 4 Jan 2003 21:42:30 +0000 (21:42 +0000)
committerRoland McGrath <roland@gnu.org>
Sat, 4 Jan 2003 21:42:30 +0000 (21:42 +0000)
* malloc/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
(void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
when compiling Bison 1.875's `bitset bset = obstack_alloc
(bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.

malloc/obstack.h

index 2a708c53a9dbe4a953b454d4acdc0cabf34589e5..a44224443f0a9c30b82e659ad7375bc6df3c5d3d 100644 (file)
@@ -119,8 +119,12 @@ extern "C" {
 #endif
 
 #ifndef __INT_TO_PTR
+#if defined __STDC__ && __STDC__
+# define __INT_TO_PTR(P) ((void *) ((P) + (char *) 0))
+#else
 # define __INT_TO_PTR(P) ((P) + (char *) 0)
 #endif
+#endif
 
 /* We need the type of the resulting object.  If __PTRDIFF_TYPE__ is
    defined, as with GNU C, use that; that way we don't pollute the
This page took 0.04845 seconds and 5 git commands to generate.