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