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
This commit is contained in:
Jason Merrill 1998-08-17 18:39:16 +00:00 committed by Jason Merrill
parent d12e8f597a
commit 5210f3d05f
2 changed files with 16 additions and 6 deletions

View File

@ -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

View File

@ -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;