Re: [Dwarf-discuss] Proposal/clarification: "inherited" subrange bounds

2024-07-27 Thread David Blaikie via Dwarf-discuss
If I'm following correctly, Alexandre - you're suggesting a situation where an instance of a type, when it appears within a packed struct, may become smaller than it would otherwise be? (usually in C that's not the case - packing only changes the alignment of instances of the type - which may

Re: [Dwarf-discuss] Proposal/clarification: "inherited" subrange bounds

2024-07-26 Thread Alexandre Oliva via Dwarf-discuss
On Jun 15, 2024, Ron Brender wrote: >> Because of the different sizes, this requires two distinct types to be >> defined in debug info. > There is no basis for this claim AFAIK. DW_TAG_subrange_type may have a DW_AT_(byte|bit)_size attribute "if the amount of storage allocated to hold each

Re: [Dwarf-discuss] Proposal/clarification: "inherited" subrange bounds

2024-06-15 Thread Ron Brender via Dwarf-discuss
>Consider a type that is a subrange of an integral base type, with an >explicitly specified bit size smaller than the bit width of a storage >unit. > >When used for a standalone variable, its byte size is the same as that >of the base type, i.e., the type is padded to a whole unit. The variable's

[Dwarf-discuss] Proposal/clarification: "inherited" subrange bounds

2024-06-14 Thread Alexandre Oliva via Dwarf-discuss
Consider a type that is a subrange of an integral base type, with an explicitly specified bit size smaller than the bit width of a storage unit. When used for a standalone variable, its byte size is the same as that of the base type, i.e., the type is padded to a whole unit. However, when used