Yes, this appears to be a typo when Fortran18 was added to the page. I've
noted this error as Issue 241121.1:

https://dwarfstd.org/issues/241121.1.html

I've also added Issue 241121.2 to add a DWARF 5 language code Fortran 23
and assigned DW_LANG_Fortran23 = 0x003f:

https://dwarfstd.org/issues/241121.2.html

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.

-cary


On Thu, Nov 21, 2024 at 8:40 AM Jakub Jelinek via Dwarf-discuss <
dwarf-discuss@lists.dwarfstd.org> wrote:

> On Thu, Nov 21, 2024 at 05:22:48PM +0100, Mark Wielaard via Dwarf-discuss
> wrote:
> > The Default Lower Bound for DW_LANG_Fortran18 on
> > https://dwarfstd.org/languages.html is listed as 0.
> > I cannot find a reference for Fortran 2018 changing the default lower
> > bound for arrays from 1 to 0. I am a Fortran noob. But I think this
> > might be a typo and it should really be 1?
>
> 23-007r1.pdf
> (Fortran 2023 draft) says in 8.5.8.2:
> "If no lower bound is specified in an explicit-shape-bounds-spec, all the
> lower bounds are equal to one."
> So yes, it should be 1, and we should have then a language code for
> Fortran 2023 as well.
>
> Although, I'm unsure if compilers really should start using these
> post-DWARF5 DW_LANG_* codes, even if newer versions of consumers are
> adjusted to handle those, if the compiler doesn't have guarantee it will be
> only used with all those newer consumers, using say DW_LANG_C11 or
> DW_LANG_C_plus_plus_14 or DW_LANG_Fortran08 for C23, C++23 or Fortran18
> means it will work even with the older consumers, while switching to the
> new
> ones means trading of some theoretical advantages (what consumers actually
> care about exact C/C++/Fortran version right now) compared to making it
> completely useless with older DWARF 5 compatible consumers (because it will
> be an unknown language for those).
>
>         Jakub
>
> --
> Dwarf-discuss mailing list
> Dwarf-discuss@lists.dwarfstd.org
> https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss
>
-- 
Dwarf-discuss mailing list
Dwarf-discuss@lists.dwarfstd.org
https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss

Reply via email to