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

2024-07-30 Thread Alexandre Oliva via Dwarf-discuss
On Jul 29, 2024, David Blaikie wrote: >> The situation is not very different, but in Ada one can specify the >> target size (in bits) for the type (which may require biased >> representations, but that's besides the point). Despite the specified >> size, standalone variables and members of unpac

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

2024-07-27 Thread Alexandre Oliva via Dwarf-discuss
On Jul 27, 2024, David Blaikie wrote: > 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? It's a philosophical question whether it's smaller in a packed str

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

2024-07-26 Thread Alexandre Oliva via Dwarf-discuss
mmediate. Say, the base type could be a DW_TAG_const_type variant >> of a subrange type. So, if we were to allow this sort of inheritance of >> bounds, it should probably also cover multiple levels. >> A simpler alternative could be to have another tag, say >> DW_TAG_[un

[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