On Jul 29, 2024, David Blaikie <dblai...@gmail.com> 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 unpacked types use full >> storage units, unless packing is requested. See >> e.g. >> https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/testsuite/gnat.dg/bias1.adb
> I see, so do I understand correctly that you'd prefer not to use the > bitfield style representation, because it'd be repetitious? There's that (Dwarf aims for compactness), but there's also the fact that the type size is explicitly specified as the smaller bit size, so a proper representation of that type would carry that piece of information. ISTM that ideally the larger, full-unit-sized variant would be the one using explicit sizes or a separate type variant inheriting the same bounds. But the problem I see, and try to raise in this thread, is that there's no way for a subrange type to inherit bounds from another subrange type, which once again plays against compactness. -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Think Assange & Stallman. The empires strike back -- Dwarf-discuss mailing list Dwarf-discuss@lists.dwarfstd.org https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss