diff options
author | Tom Tromey <tromey@redhat.com> | 2012-09-21 17:37:45 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-09-21 17:37:45 +0000 |
commit | b89e95a1a2fbb7cad75c73dfcd1a8111e3628e73 (patch) | |
tree | fdf240adde2907359062ca95c69a210a3e67986b /gdb/c-typeprint.c | |
parent | 0a8fffea4ec2ed842aaa87405419d00fecdb21cd (diff) | |
download | gdb-b89e95a1a2fbb7cad75c73dfcd1a8111e3628e73.tar.gz |
* c-typeprint.c (c_type_print_base) <TYPE_CODE_STRUCT,
TYPE_CODE_UNION>: Unify, removing a goto.
Diffstat (limited to 'gdb/c-typeprint.c')
-rw-r--r-- | gdb/c-typeprint.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c index 71d84cffbef..9ce6f632b71 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c @@ -768,18 +768,14 @@ c_type_print_base (struct type *type, struct ui_file *stream, break; case TYPE_CODE_STRUCT: + case TYPE_CODE_UNION: c_type_print_modifier (type, stream, 0, 1); - if (TYPE_DECLARED_CLASS (type)) + if (TYPE_CODE (type) == TYPE_CODE_UNION) + fprintf_filtered (stream, "union "); + else if (TYPE_DECLARED_CLASS (type)) fprintf_filtered (stream, "class "); else fprintf_filtered (stream, "struct "); - goto struct_union; - - case TYPE_CODE_UNION: - c_type_print_modifier (type, stream, 0, 1); - fprintf_filtered (stream, "union "); - - struct_union: /* Print the tag if it exists. The HP aCC compiler emits a spurious "{unnamed struct}"/"{unnamed union}"/"{unnamed |