mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
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.
This commit is contained in:
@@ -119,8 +119,12 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __INT_TO_PTR
|
#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)
|
# define __INT_TO_PTR(P) ((P) + (char *) 0)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is
|
/* 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
|
defined, as with GNU C, use that; that way we don't pollute the
|
||||||
|
Reference in New Issue
Block a user