aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <merrill@gnu.org>1996-03-07 01:40:04 +0000
committerJason Merrill <merrill@gnu.org>1996-03-07 01:40:04 +0000
commit983edca44c1faa020de3e99bab9f8c35e66485b0 (patch)
tree35185a139ff41634236b2aae421bccc5a371a8aa
parent326bdf5894bbd2b9aba5344c588f0f4057904b74 (diff)
downloadgcc-983edca44c1faa020de3e99bab9f8c35e66485b0.zip
gcc-983edca44c1faa020de3e99bab9f8c35e66485b0.tar.gz
gcc-983edca44c1faa020de3e99bab9f8c35e66485b0.tar.bz2
(demangle_template): Fix for address-of-extern arguments.
From-SVN: r11487
-rw-r--r--gcc/cplus-dem.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cplus-dem.c b/gcc/cplus-dem.c
index 5525be7..da0ffff 100644
--- a/gcc/cplus-dem.c
+++ b/gcc/cplus-dem.c
@@ -1064,7 +1064,15 @@ demangle_template (work, mangled, tname, trawname)
if (symbol_len == 0)
string_appendn (tname, "0", 1);
else
- string_appendn (tname, *mangled, symbol_len);
+ {
+ char *p = xmalloc (symbol_len + 1), *q;
+ strncpy (p, *mangled, symbol_len);
+ q = cplus_demangle (p, work->options);
+ string_appendn (tname, "&", 1);
+ string_append (tname, q);
+ free (p);
+ free (q);
+ }
*mangled += symbol_len;
}
}