[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] Re: malloc/obstack.h macros no longer work in C++
From: |
Paul Eggert |
Subject: |
[Bug-gnulib] Re: malloc/obstack.h macros no longer work in C++ |
Date: |
11 Jul 2003 16:41:00 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
(Following up your message archived in
<http://mail.gnu.org/archive/html/bug-glibc/2003-07/msg00024.html>.)
Thanks; I installed the following patch into gnulib, and it should
appear in the next bison etc. releases automatically. I am planning
to help merge gnulib changes into glibc but am waiting until I can
join libc-hacker.
2003-07-11 Alexandre Duret-Lutz <address@hidden>
* obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
it breaks C++ compilation.
[!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
Index: obstack.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/obstack.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -p -u -r1.20 -r1.21
--- obstack.h 9 Jul 2003 22:48:53 -0000 1.20
+++ obstack.h 11 Jul 2003 23:33:34 -0000 1.21
@@ -122,12 +122,8 @@ 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
@@ -585,7 +581,7 @@ __extension__
\
> (h)->chunk_limit - (char *) (h)->chunk) \
? ((h)->next_free = (h)->chunk_limit) : 0), \
(h)->object_base = (h)->next_free, \
- __INT_TO_PTR ((h)->temp))
+ (void *) __INT_TO_PTR ((h)->temp))
# if defined __STDC__ && __STDC__
# define obstack_free(h,obj) \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gnulib] Re: malloc/obstack.h macros no longer work in C++,
Paul Eggert <=