This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] dwarf2out: Use normal constant values in bound_info if possible.

> +       /* If HOST_WIDE_INT is big enough then represent the bound as
> +          a constant value.  Note that we need to make sure the type
> +          is signed or unsigned.  We cannot just add an unsigned
> +          constant if the value itself is positive.  Some DWARF
> +          consumers will lookup the bounds type and then sign extend
> +          any unsigned values found for signed types.  This is only
> +          for DW_AT_lower_bound, normally unsigned values
> +          (DW_FORM_data[1248]) are assumed to not need
> +          sign-extension.  */

This comment confuses me. By "we need to make sure the type is signed
or unsigned" (what else can it be?), I think you mean "we need to
choose a form based on whether the type is signed or unsigned." And by
"This is only for DW_AT_lower_bound, ...", I think you mean "This is
needed only for DW_AT_{lower,upper}_bound, since for most other
attributes, consumers will treat DW_FORM_data[1248] as unsigned
values, regardless of the underlying type."

Otherwise, the patch looks OK to me.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]