diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-08-17 18:39:16 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-08-17 14:39:16 -0400 |
commit | 5210f3d05f10ed390e20808f1eeeff473a448a7e (patch) | |
tree | a703f61ad7474aa09c1d9eb9528b80799606575b /libiberty | |
parent | d12e8f597a8456fb3628807991d0996f23cfadb2 (diff) | |
download | gcc-5210f3d05f10ed390e20808f1eeeff473a448a7e.tar.gz |
cplus-dem.c (do_type): Fix simple array handling.
* cplus-dem.c (do_type): Fix simple array handling. If we fail,
stay failed.
From-SVN: r21798
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 5 | ||||
-rw-r--r-- | libiberty/cplus-dem.c | 17 |
2 files changed, 16 insertions, 6 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 1cb3bdbf8dd..30a7920bd54 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +1998-08-17 Jason Merrill <jason@yorick.cygnus.com> + + * cplus-dem.c (do_type): Fix simple array handling. If we fail, + stay failed. + Mon Aug 17 10:40:34 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * cplus-dem.c: Include config.h if it exists. Also, only diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c index 60c3ce96528..1f3dc529efa 100644 --- a/libiberty/cplus-dem.c +++ b/libiberty/cplus-dem.c @@ -2491,10 +2491,15 @@ do_type (work, mangled, result) case 'A': { ++(*mangled); - string_prepend (&decl, "("); - string_append (&decl, ")["); - success = demangle_template_value_parm (work, mangled, &decl, - tk_integral); + if (!STRING_EMPTY (&decl) && decl.b[0] == '*') + { + string_prepend (&decl, "("); + string_append (&decl, ")"); + } + string_append (&decl, "["); + if (**mangled != '_') + success = demangle_template_value_parm (work, mangled, &decl, + tk_integral); if (**mangled == '_') ++(*mangled); string_append (&decl, "]"); @@ -2651,7 +2656,7 @@ do_type (work, mangled, result) } } - switch (**mangled) + if (success) switch (**mangled) { /* A qualified name, such as "Outer::Inner". */ case 'Q': @@ -2665,7 +2670,7 @@ do_type (work, mangled, result) case 'B': (*mangled)++; if (!get_count (mangled, &n) || n >= work -> numb) - success = 0; + success = 0; else string_append (result, work->btypevec[n]); break; |