summary refs log tree commit diff
path: root/malloc/obstack.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-01-04 21:42:30 +0000
committerRoland McGrath <roland@gnu.org>2003-01-04 21:42:30 +0000
commit134f3e242432ae59442bec1fca26a353d00f3eba (patch)
tree5ef1dce1e8f9ebc7b8f7280688ed5f9088d73749 /malloc/obstack.h
parent43cd993307eae39754e15dc7f625e630ce2c0b88 (diff)
downloadglibc-134f3e242432ae59442bec1fca26a353d00f3eba.tar.gz
glibc-134f3e242432ae59442bec1fca26a353d00f3eba.tar.xz
glibc-134f3e242432ae59442bec1fca26a353d00f3eba.zip
2002-01-03 Paul Eggert <eggert@twinsun.com>
	* 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.
Diffstat (limited to 'malloc/obstack.h')
-rw-r--r--malloc/obstack.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/malloc/obstack.h b/malloc/obstack.h
index 2a708c53a9..a44224443f 100644
--- a/malloc/obstack.h
+++ b/malloc/obstack.h
@@ -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