<div dir="ltr">Yes, this appears to be a typo when Fortran18 was added to the page. I've noted this error as Issue 241121.1:<div><br></div><div><a href="https://dwarfstd.org/issues/241121.1.html">https://dwarfstd.org/issues/241121.1.html</a></div><div><br></div><div>I've also added Issue 241121.2 to add a DWARF 5 language code Fortran 23 and assigned DW_LANG_Fortran23 = 0x003f:</div><div><br></div><div><a href="https://dwarfstd.org/issues/241121.2.html">https://dwarfstd.org/issues/241121.2.html</a></div><div><br></div><div>We will continue adding new DW_LANG language codes as necessary at least until DWARF 6 is published, and probably for a while after that. Newly assigned DW_LANG codes are considered addenda to the spec for DWARF 5, and should be valid to use with earlier DWARF versions as well.</div><div><br></div><div>-cary</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 21, 2024 at 8:40 AM 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 Thu, Nov 21, 2024 at 05:22:48PM +0100, Mark Wielaard via Dwarf-discuss wrote:<br>
> The Default Lower Bound for DW_LANG_Fortran18 on<br>
> <a href="https://dwarfstd.org/languages.html" rel="noreferrer" target="_blank">https://dwarfstd.org/languages.html</a> is listed as 0.<br>
> I cannot find a reference for Fortran 2018 changing the default lower<br>
> bound for arrays from 1 to 0. I am a Fortran noob. But I think this<br>
> might be a typo and it should really be 1?<br>
<br>
23-007r1.pdf<br>
(Fortran 2023 draft) says in <a href="http://8.5.8.2" rel="noreferrer" target="_blank">8.5.8.2</a>:<br>
"If no lower bound is specified in an explicit-shape-bounds-spec, all the<br>
lower bounds are equal to one."<br>
So yes, it should be 1, and we should have then a language code for<br>
Fortran 2023 as well.<br>
<br>
Although, I'm unsure if compilers really should start using these<br>
post-DWARF5 DW_LANG_* codes, even if newer versions of consumers are<br>
adjusted to handle those, if the compiler doesn't have guarantee it will be<br>
only used with all those newer consumers, using say DW_LANG_C11 or<br>
DW_LANG_C_plus_plus_14 or DW_LANG_Fortran08 for C23, C++23 or Fortran18<br>
means it will work even with the older consumers, while switching to the new<br>
ones means trading of some theoretical advantages (what consumers actually<br>
care about exact C/C++/Fortran version right now) compared to making it<br>
completely useless with older DWARF 5 compatible consumers (because it will<br>
be an unknown language for those).<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>