Allow linux ppc to bootstrap again

From-SVN: r176631
This commit is contained in:
Michael Meissner 2011-07-22 15:49:08 +00:00 committed by Michael Meissner
parent b75d1e2107
commit e56fa6bb12
2 changed files with 11 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2011-07-20 Michael Meissner <meissner@linux.vnet.ibm.com>
* 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 <mjambor@suse.cz>
PR lto/49796

View File

@ -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 = '_';