merge from gcc
authorDJ Delorie <dj@redhat.com>
Tue, 13 Jul 2004 21:10:23 +0000 (21:10 +0000)
committerDJ Delorie <dj@redhat.com>
Tue, 13 Jul 2004 21:10:23 +0000 (21:10 +0000)
include/ChangeLog
include/libiberty.h
include/obstack.h

index fd340f0566ad5af8fb4f2264c9c5953ed2a0a0d2..e6af921b5c6c7ca1364569ef0ed7a43f0137f59f 100644 (file)
@@ -1,3 +1,16 @@
+2004-07-13  Bernardo Innocenti  <bernie@develer.com>
+
+       * libiberty.h (XNEW, XCNEW, XNEWVEC, XCNEWVEC, XOBNEW): Move here from
+       libcpp/internal.h.
+       (XDELETE, XRESIZEVEC, XDELETEVEC, XNEWVAR, XCNEWVAR, XRESIZEVAR): New
+       macros.
+
+2004-07-13  Bernardo Innocenti  <bernie@develer.com>
+
+       * libiberty.h (ASTRDUP): Add casts required for stricter
+       type conversion rules of C++.
+       * obstack.h (obstack_free): Likewise.
+
 2004-07-07  Tomer Levi  <Tomer.Levi@nsc.com>
 
        * dis-asm.h (print_insn_crx): Declare.
index 761b2cf060ff5a33f4cfe7229099b85ef55351c9..5c1015385806f385dbba28176046eec8c1c07261 100644 (file)
@@ -309,7 +309,7 @@ extern PTR C_alloca PARAMS ((size_t)) ATTRIBUTE_MALLOC;
 # define ASTRDUP(X) \
   (__extension__ ({ const char *const libiberty_optr = (X); \
    const unsigned long libiberty_len = strlen (libiberty_optr) + 1; \
-   char *const libiberty_nptr = alloca (libiberty_len); \
+   char *const libiberty_nptr = (char *const) alloca (libiberty_len); \
    (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len); }))
 #else
 # define alloca(x) C_alloca(x)
@@ -323,7 +323,7 @@ extern unsigned long libiberty_len;
 # define ASTRDUP(X) \
   (libiberty_optr = (X), \
    libiberty_len = strlen (libiberty_optr) + 1, \
-   libiberty_nptr = alloca (libiberty_len), \
+   libiberty_nptr = (char *) alloca (libiberty_len), \
    (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len))
 #endif
 
index 5496ff24071a6ccf87eaaf319eb8cf08387d8a49..007853e805d2115478ba40d8fbe900486d9049f9 100644 (file)
@@ -494,9 +494,9 @@ __extension__                                                               \
 # define obstack_free(OBSTACK, OBJ)                                    \
 __extension__                                                          \
 ({ struct obstack *__o = (OBSTACK);                                    \
-   void *__obj = (OBJ);                                                        \
+   void *__obj = (void *) (OBJ);                                       \
    if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit)  \
-     __o->next_free = __o->object_base = __obj;                                \
+     __o->next_free = __o->object_base = (char *) __obj;               \
    else (obstack_free) (__o, __obj); })
 \f
 #else /* not __GNUC__ or not __STDC__ */
This page took 0.034104 seconds and 4 git commands to generate.