OSDN Git Service

merge from gcc
authordj <dj>
Tue, 24 May 2005 21:00:54 +0000 (21:00 +0000)
committerdj <dj>
Tue, 24 May 2005 21:00:54 +0000 (21:00 +0000)
include/ChangeLog
include/ansidecl.h
include/libiberty.h

index f7097c9..62a5eae 100644 (file)
@@ -1,3 +1,10 @@
+2005-05-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+       * libiberty.h (ACONCAT): Properly cast value of alloca().
+
+       * ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Don't define if
+       __cplusplus.
+
 2005-05-12  Steve Ellcey  <sje@cup.hp.com>
 
        libiberty.h: Do not define empty basename prototype.
index 02bb412..380e7b3 100644 (file)
@@ -258,11 +258,11 @@ So instead we use the macro below and test it against specific values.  */
 
 /* Attributes on labels were valid as of gcc 2.93. */
 #ifndef ATTRIBUTE_UNUSED_LABEL
-# if (GCC_VERSION >= 2093)
+# if (!defined (__cplusplus) && GCC_VERSION >= 2093)
 #  define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
 # else
 #  define ATTRIBUTE_UNUSED_LABEL
-# endif /* GNUC >= 2.93 */
+# endif /* !__cplusplus && GNUC >= 2.93 */
 #endif /* ATTRIBUTE_UNUSED_LABEL */
 
 #ifndef ATTRIBUTE_UNUSED
index ae0ab2b..9af981c 100644 (file)
@@ -156,7 +156,7 @@ extern char *libiberty_concat_ptr;
    strings.  Allocates memory using alloca.  The arguments are
    evaluated twice!  */
 #define ACONCAT(ACONCAT_PARAMS) \
-  (libiberty_concat_ptr = alloca (concat_length ACONCAT_PARAMS + 1), \
+  (libiberty_concat_ptr = (char *) alloca (concat_length ACONCAT_PARAMS + 1), \
    concat_copy2 ACONCAT_PARAMS)
 
 /* Check whether two file descriptors refer to the same file.  */