[Dwarf-discuss] The new Version Scheme for V6.

Cary Coutant ccoutant@gmail.com
Fri Mar 28 17:24:25 GMT 2025


>
> Yeah.  Strings are more expensive than just numbers (which can be done
> through DW_FORM_implicit_const) and for strings you'd need some agreed way
> how to compare what is newer and what is older.
> strverscmp, rpmvercmp, ... (many choices, what is the right segmented
> string
> comparison)?
>

For an attribute that is used maybe once per compilation unit, I don't
think the space cost is all that significant. But specifying how to compare
dotted strings is tricky. We could just require the language to use
zero-padded segments, like "003.006.007" so that the strings can simply be
compared lexically.


> If you have a language that uses more than 2 digit minor or patchlevel
> versions, either you need to stay at 99 or when adding the language
> go for VVVMMMPPP versioning scheme instead.
>

Once a version scheme is assigned, it's not that simple to change it. We'd
have to impose a requirement that in moving from one scheme to another, the
producer guarantees that newer versions always compare greater than earlier
versions (e.g., moving from VVMMPP to a hypothetical VVVMMMPPP would work
as long as VVV > 0).

-cary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dwarfstd.org/pipermail/dwarf-discuss/attachments/20250328/036a81a0/attachment.htm>


More information about the Dwarf-discuss mailing list