diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-11 08:32:10 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-10-11 08:32:10 +0000 |
commit | 6c65e8d76ee07cd4919e48b7a3f80426e76e7aa7 (patch) | |
tree | 7bd986ec1965f661fdc33be919399c3bfa49ea65 /libiberty | |
parent | 58ffe168d6b4034557ac947b1a5d9e2c9443ed4d (diff) | |
download | gcc-6c65e8d76ee07cd4919e48b7a3f80426e76e7aa7.tar.gz |
* cplus-dem.c (do_type): Handle pointer to member types whose
enclosing classes have namespace scope.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29901 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 5 | ||||
-rw-r--r-- | libiberty/cplus-dem.c | 15 | ||||
-rw-r--r-- | libiberty/testsuite/demangle-expected | 4 |
3 files changed, 23 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index e80098ea208..05dfb36b937 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +1999-10-11 Mark Mitchell <mark@codesourcery.com> + + * cplus-dem.c (do_type): Handle pointer to member types whose + enclosing classes have namespace scope. + Sun Oct 10 01:23:50 1999 Marc Espie <espie@cvs.openbsd.org> * config.table: Provide a backup shell for executing move-if-change. diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c index ef6c5111dc4..6a6bc1afa9a 100644 --- a/libiberty/cplus-dem.c +++ b/libiberty/cplus-dem.c @@ -3072,7 +3072,12 @@ do_type (work, mangled, result) (*mangled)++; string_append (&decl, ")"); - string_prepend (&decl, SCOPE_STRING (work)); + + /* We don't need to prepend `::' for a qualified name; + demangle_qualified will do that for us. */ + if (**mangled != 'Q') + string_prepend (&decl, SCOPE_STRING (work)); + if (isdigit ((unsigned char)**mangled)) { n = consume_count (mangled); @@ -3105,6 +3110,14 @@ do_type (work, mangled, result) else break; } + else if (**mangled == 'Q') + { + success = demangle_qualified (work, mangled, &decl, + /*isfuncnam=*/0, + /*append=*/0); + if (!success) + break; + } else { success = 0; diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index ad04d116d8b..0156d273a29 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -2470,3 +2470,7 @@ _Utf390_1__1_9223372036854775807__9223372036854775 --format=gnu call__H1Z4Test_RX01_t1C2ZX01PMX01FPX01i_vQ2X016output C<Test, Test::output> call<Test>(Test &) +# +--format=gnu +fn__FPQ21n1cPMQ21n1cFPQ21n1c_i +fn(n::c *, int (n::c::*)(n::c *)) |