diff --git a/gcc/ChangeLog b/gcc/ChangeLog index af5185a7e65..2182cff225d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-01-03 Pierre-Marie de Rodat + + * dwarf2out.c (gen_enumeration_type_die): When + -gno-strict-dwarf, add a DW_AT_encoding attribute. + 2017-01-03 Jakub Jelinek PR tree-optimization/78965 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index edb71692033..15b9a30a307 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -20930,6 +20930,11 @@ gen_enumeration_type_die (tree type, dw_die_ref context_die) if (ENUM_IS_OPAQUE (type)) add_AT_flag (type_die, DW_AT_declaration, 1); } + if (!dwarf_strict) + add_AT_unsigned (type_die, DW_AT_encoding, + TYPE_UNSIGNED (type) + ? DW_ATE_unsigned + : DW_ATE_signed); } else if (! TYPE_SIZE (type)) return type_die;