Commit fda4ba99 by Ian Lance Taylor Committed by Ian Lance Taylor

collect2.c (dump_file): If a demangled symbol is followed by a space...

	* collect2.c (dump_file): If a demangled symbol is followed by a
	space, make sure we output at least one space.

From-SVN: r130243
parent 5abe9685
2007-11-16 Ian Lance Taylor <iant@google.com>
* collect2.c (dump_file): If a demangled symbol is followed by a
space, make sure we output at least one space.
2007-11-16 Richard Guenther <rguenther@suse.de>
PR middle-end/34030
......@@ -487,8 +487,18 @@ dump_file (const char *name, FILE *to)
diff = strlen (word) - strlen (result);
while (diff > 0 && c == ' ')
--diff, putc (' ', to);
while (diff < 0 && c == ' ')
++diff, c = getc (stream);
if (diff < 0 && c == ' ')
{
while (diff < 0 && c == ' ')
++diff, c = getc (stream);
if (!ISSPACE (c))
{
/* Make sure we output at least one space, or
the demangled symbol name will run into
whatever text follows. */
putc (' ', to);
}
}
free (result);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment