On Fri, Mar 28, 2025 at 9:14 AM David Anderson <dave...@gmail.com> wrote:

> On 3/28/25 08:30, David Blaikie wrote:
> > I believe the intent is that version numbers are able to be compared
> > numerically.
> >
> > In any case, they are numbers per https://dwarfstd.org/
> > issues/210419.1.html <https://dwarfstd.org/issues/210419.1.html> - "A
> > DW_AT_language_version attribute may be specified whose constant value
> > is an integer code indicating the version of the source language."
> >
>
> My point is that attempting to use an integer is a bad fit to semantic
> versioning and breaks down in real cases.
>
> I suppose the attraction of an integer is that the integer will be fewer
> bytes than an ascii representation.
>

It also allows some amount of version comparisons without
decomposing/parsing the version number, etc. This, at least, is how C++'s
number is defined/works - makes it easier to check for "do I have at least
C++17". Which is one of the benefits of the DWARFv6 codes in general - a
consumer can check "is this any version of C++" and "is this at least
version X of C++", etc.


>
> The chances of compiler versions violating the default
> field size assumptions seem pretty small, I admit.
>
> Never mind.
> DavidA
>
-- 
Dwarf-discuss mailing list
Dwarf-discuss@lists.dwarfstd.org
https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss

Reply via email to