[Dwarf-discuss] Proposal: C standard release dates for DW_AT_language_version, clarify semantics

Cary Coutant ccoutant@gmail.com
Fri Apr 26 21:29:23 GMT 2024


Added as Issue 240424.2 <https://dwarfstd.org/issues/240424.2.html>, with
Jakub's corrections.

-cary

On Wed, Apr 24, 2024 at 2:50 PM Jakub Jelinek via Dwarf-discuss <
dwarf-discuss@lists.dwarfstd.org> wrote:

> On Wed, Apr 24, 2024 at 02:25:37PM -0700, Adrian Prantl via Dwarf-discuss
> wrote:
> > # C standard release dates for DW_AT_language_version, clarify semantics
> >
> > ## Background
> >
> > The list of languages at https://dwarfstd.org/languages-v6.html does
> not list release dates for the ISO C standard. Producers need to know what
> version numbers they should produce though. I scanned the ISO website for
> appropriate dates to use.
> >
> > ## Proposed Changes
> >
> > Augment the table of language encodings to add
> > C (K&R and ISO) DW_LNAME_C 0x0003 0 YYYYMM
> >
> > K&R 000000
> > C89 198912
> > C99 199912
> > C11 201112
> > C17 201806 (sic!)
> > C2x >201806
>
> That is not correct.
> C99 199901
> C11 201112
> C17 201710
> C23 202311
>
> C89 with ammendment 1 would be
> 199409
> C89 likely that 198912 indeed.
>
> As for C++, the above page is missing
> C++23 202302
> >
> > Add the following non-normative wording:
> >
> > To convert a version number to a specific release, it is good practice
> to treat the YYYMM version numbers listed in this document as the maximum
> version that is interpreted as belonging to a specific release.
>
> > This way consumers can emit version numbers for unreleased upcoming
> specifications, by using, e.g., the date the compiler was built.
>
> That is not a good suggestion.
> If a compiler supports some part of e.g. C23 but not everything, it should
> be something larger than 201710 but smaller than 202311, even when the date
> the compiler was built could be 202404 or later.
> GCC and Clang up to 17 used e.g. 202000 for C23 partial implementations,
> GCC still does, Clang 18+ now uses 202311.
>
>         Jakub
>
> --
> Dwarf-discuss mailing list
> Dwarf-discuss@lists.dwarfstd.org
> https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dwarfstd.org/pipermail/dwarf-discuss/attachments/20240426/8405ce93/attachment-0001.htm>


More information about the Dwarf-discuss mailing list