This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[libibery PATCH] Fix bootstrap


We now warn on casts to T const.  Applied as obvious to fix bootstrap.

nathan
--
Nathan Sidwell
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 248441)
+++ ChangeLog	(working copy)
@@ -1,3 +1,7 @@
+2017-05-24  Nathan Sidwell  <nathan@acm.org>
+
+	* libiberty.h (ASTRDUP): Adjust cast to avoid warning.
+
 2017-05-19  Eli Zaretskii <eliz@gnu.org>
 
 	* environ.h: Add #ifndef guard.
Index: libiberty.h
===================================================================
--- libiberty.h	(revision 248441)
+++ libiberty.h	(working copy)
@@ -724,7 +724,7 @@ extern void *C_alloca (size_t) ATTRIBUTE
 # define ASTRDUP(X) \
   (__extension__ ({ const char *const libiberty_optr = (X); \
    const unsigned long libiberty_len = strlen (libiberty_optr) + 1; \
-   char *const libiberty_nptr = (char *const) alloca (libiberty_len); \
+   char *const libiberty_nptr = (char *) alloca (libiberty_len); \
    (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len); }))
 #else
 # define alloca(x) C_alloca(x)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]