summaryrefslogtreecommitdiffstats
path: root/gcc/collect2.c
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-16 22:11:29 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-16 22:11:29 +0000
commit8698b7cfbdbc3490faac5389e9cf710953078ec5 (patch)
treed71589ea906a6942311db475f060e7e1c6772d5d /gcc/collect2.c
parent66fa37a17dc61220c7831a4c641786a4a0b6e91a (diff)
downloadppe42-gcc-8698b7cfbdbc3490faac5389e9cf710953078ec5.tar.gz
ppe42-gcc-8698b7cfbdbc3490faac5389e9cf710953078ec5.zip
* collect2.c (dump_file): If a demangled symbol is followed by a
space, make sure we output at least one space. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130243 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/collect2.c')
-rw-r--r--gcc/collect2.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/collect2.c b/gcc/collect2.c
index 9d5e5c2ae10..a673f256c3d 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -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);
}
OpenPOWER on IntegriCloud