From: Michael Meissner Date: Fri, 22 Jul 2011 15:49:08 +0000 (+0000) Subject: Allow linux ppc to bootstrap again X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e56fa6bb1265f0ceaeeb49d01d51786d6941a2ed;p=gcc.git Allow linux ppc to bootstrap again From-SVN: r176631 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aae9d084037..44cbfae94c8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-07-20 Michael Meissner + + * config/rs6000/rs6000.c (rs6000_xcoff_strip_dollar): Rewrite to + avoid warnings when GCC is built with a C++ compiler. + 2011-07-22 Martin Jambor PR lto/49796 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 20b3cb8fea6..0d4e6d5069f 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -21894,17 +21894,18 @@ const char * rs6000_xcoff_strip_dollar (const char *name) { char *strip, *p; - int len; + const char *q; + size_t len; - p = strchr (name, '$'); + q = (const char *) strchr (name, '$'); - if (p == 0 || p == name) + if (q == 0 || q == name) return name; len = strlen (name); - strip = (char *) alloca (len + 1); + strip = XALLOCAVEC (char, len + 1); strcpy (strip, name); - p = strchr (strip, '$'); + p = strip + (q - name); while (p) { *p = '_';