<div dir="ltr"><div>Added as Issue <a href="https://dwarfstd.org/issues/240424.2.html">240424.2</a>, with Jakub's corrections.</div><div><br></div><div>-cary</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 24, 2024 at 2:50 PM Jakub Jelinek via Dwarf-discuss <<a href="mailto:dwarf-discuss@lists.dwarfstd.org">dwarf-discuss@lists.dwarfstd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Apr 24, 2024 at 02:25:37PM -0700, Adrian Prantl via Dwarf-discuss wrote:<br>
> # C standard release dates for DW_AT_language_version, clarify semantics<br>
> <br>
> ## Background<br>
> <br>
> The list of languages at <a href="https://dwarfstd.org/languages-v6.html" rel="noreferrer" target="_blank">https://dwarfstd.org/languages-v6.html</a> 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.<br>
> <br>
> ## Proposed Changes<br>
> <br>
> Augment the table of language encodings to add<br>
> C (K&R and ISO) DW_LNAME_C 0x0003 0 YYYYMM <br>
> <br>
> K&R 000000<br>
> C89 198912<br>
> C99 199912<br>
> C11 201112<br>
> C17 201806 (sic!)<br>
> C2x >201806<br>
<br>
That is not correct.<br>
C99 199901<br>
C11 201112<br>
C17 201710<br>
C23 202311<br>
<br>
C89 with ammendment 1 would be<br>
199409<br>
C89 likely that 198912 indeed.<br>
<br>
As for C++, the above page is missing<br>
C++23 202302<br>
> <br>
> Add the following non-normative wording: <br>
> <br>
> 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.<br>
<br>
> This way consumers can emit version numbers for unreleased upcoming specifications, by using, e.g., the date the compiler was built.<br>
<br>
That is not a good suggestion.<br>
If a compiler supports some part of e.g. C23 but not everything, it should<br>
be something larger than 201710 but smaller than 202311, even when the date<br>
the compiler was built could be 202404 or later.<br>
GCC and Clang up to 17 used e.g. 202000 for C23 partial implementations,<br>
GCC still does, Clang 18+ now uses 202311.<br>
<br>
Jakub<br>
<br>
-- <br>
Dwarf-discuss mailing list<br>
<a href="mailto:Dwarf-discuss@lists.dwarfstd.org" target="_blank">Dwarf-discuss@lists.dwarfstd.org</a><br>
<a href="https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss" rel="noreferrer" target="_blank">https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss</a><br>
</blockquote></div></div>