[Dwarf-discuss] Default Lower Bound for Ada{2005,2012}

Tom Tromey tromey@adacore.com
Fri Nov 22 14:36:28 GMT 2024


>>>>> "Jakub" == Jakub Jelinek <jakub@redhat.com> writes:

Jakub> DW_LANG_Ada95 	0x000d 	1

Jakub> I admit I know nothing about Ada (CCing Tom if he can clarify), but I'd find it
Jakub> unexpected if Ada 83/95 defaulted to lower bound 1 and Ada 2005/2012 all of
Jakub> sudden switched to lower bound 0.

In Ada, the lower bound is always specified by the index type.  There's
no real "default".

However, the default in DWARF is 1, because it's a common lower bound in
Ada programs, and I suppose having a default allows some space saving?
Joel filed this DWARF issue back in 2008 on this topic:

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

Tom


More information about the Dwarf-discuss mailing list