diff options
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 9742021..3cffc4e 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -8097,30 +8097,19 @@ base_type_die (tree type) switch (TREE_CODE (type)) { + case CHAR_TYPE: case INTEGER_TYPE: - /* Carefully distinguish the C character types, without messing - up if the language is not C. Note that we check only for the names - that contain spaces; other names might occur by coincidence in other - languages. */ - if (! (TYPE_PRECISION (type) == CHAR_TYPE_SIZE - && (TYPE_MAIN_VARIANT (type) == char_type_node - || ! strcmp (type_name, "signed char") - || ! strcmp (type_name, "unsigned char")))) + if (TYPE_STRING_FLAG (type)) { if (TYPE_UNSIGNED (type)) - encoding = DW_ATE_unsigned; + encoding = DW_ATE_unsigned_char; else - encoding = DW_ATE_signed; - break; + encoding = DW_ATE_signed_char; } - /* else fall through. */ - - case CHAR_TYPE: - /* GNU Pascal/Ada CHAR type. Not used in C. */ - if (TYPE_UNSIGNED (type)) - encoding = DW_ATE_unsigned_char; + else if (TYPE_UNSIGNED (type)) + encoding = DW_ATE_unsigned; else - encoding = DW_ATE_signed_char; + encoding = DW_ATE_signed; break; case REAL_TYPE: |