error.c (dump_type_real): Don't crash when presented with intQI_type_node or the like.
* error.c (dump_type_real): Don't crash when presented with intQI_type_node or the like. From-SVN: r21284
This commit is contained in:
parent
8014a339af
commit
3df095e2f1
2 changed files with 15 additions and 2 deletions
|
@ -1,5 +1,8 @@
|
|||
1998-07-19 Mark Mitchell <mark@markmitchell.com>
|
||||
|
||||
* error.c (dump_type_real): Don't crash when presented with
|
||||
intQI_type_node or the like.
|
||||
|
||||
* semantics.c (finish_translation_unit): Fix spelling error in
|
||||
comment.
|
||||
|
||||
|
|
|
@ -229,8 +229,18 @@ dump_type_real (t, v, canonical_name)
|
|||
case REAL_TYPE:
|
||||
case VOID_TYPE:
|
||||
case BOOLEAN_TYPE:
|
||||
dump_readonly_or_volatile (t, after);
|
||||
OB_PUTID (TYPE_IDENTIFIER (canonical_name ? TYPE_MAIN_VARIANT (t) : t));
|
||||
{
|
||||
tree type;
|
||||
dump_readonly_or_volatile (t, after);
|
||||
type = canonical_name ? TYPE_MAIN_VARIANT (t) : t;
|
||||
if (TYPE_NAME (type) && TYPE_IDENTIFIER (type))
|
||||
OB_PUTID (TYPE_IDENTIFIER (type));
|
||||
else
|
||||
/* Types like intQI_type_node and friends have no names.
|
||||
These don't come up in user error messages, but it's nice
|
||||
to be able to print them from the debugger. */
|
||||
OB_PUTS ("{anonymous}");
|
||||
}
|
||||
break;
|
||||
|
||||
case TEMPLATE_TEMPLATE_PARM:
|
||||
|
|
Loading…
Add table
Reference in a new issue