From cf8a198218e26c5c5d28307b8ebd4eec021b57e4 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Mon, 23 Nov 1998 08:52:24 +0000 Subject: [PATCH] cplus-dem.c (demangle_prefix): Use the last "__" in the mangled name when looking for the signature. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit � *cplus-dem.c (demangle_prefix): Use the last "__" in the mangled name when looking for the signature. This allows template names to begin with "__". From-SVN: r23778 --- gcc/ChangeLog | 6 ++++++ gcc/cplus-dem.c | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2df69a155c46..442382158ce5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Mon Nov 23 09:49:49 1998 Andrew MacLeod + + *cplus-dem.c (demangle_prefix): Use the last "__" + in the mangled name when looking for the signature. This allows + template names to begin with "__". + Mon Nov 23 09:40:41 1998 David Edelsohn * rs6000.h (LEGITIMIZE_ADDRESS): Add missing "goto WIN". diff --git a/gcc/cplus-dem.c b/gcc/cplus-dem.c index c5d76a73e506..1a3ec90ec400 100644 --- a/gcc/cplus-dem.c +++ b/gcc/cplus-dem.c @@ -1923,7 +1923,15 @@ demangle_prefix (work, mangled, declp) } else { - demangle_function_name (work, mangled, declp, scan); + const char *tmp; + /* Look for the LAST occurrence of __, allowing names to have + the '__' sequence embedded in them.*/ + while ((tmp = mystrstr (scan+2, "__")) != NULL) + scan = tmp; + if (*(scan + 2) == '\0') + success = 0; + else + demangle_function_name (work, mangled, declp, scan); } } } -- 2.47.2