* dwarf2read.c (read_base_type): Set code to TYPE_CODE_CHAR

for char and unsigned char types of Ada compilation units.
        * ada-lang.c (ada_is_character_type): Always return true if
        the type code is TYPE_CODE_CHAR.
This commit is contained in:
Joel Brobecker
2007-12-24 06:29:27 +00:00
parent 5209009a1b
commit 7b9f71f288
3 changed files with 25 additions and 11 deletions

View File

@@ -5007,11 +5007,11 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu)
type_flags |= TYPE_FLAG_UNSIGNED;
break;
case DW_ATE_signed_char:
if (cu->language == language_m2)
if (cu->language == language_ada && cu->language == language_m2)
code = TYPE_CODE_CHAR;
break;
case DW_ATE_unsigned_char:
if (cu->language == language_m2)
if (cu->language == language_ada && cu->language == language_m2)
code = TYPE_CODE_CHAR;
type_flags |= TYPE_FLAG_UNSIGNED;
break;