[Dwarf-Discuss] default lower bound of DW_TAG_subrange_type for Ada
Joel Brobecker
brobecker@adacore.com
Tue Apr 22 19:09:13 GMT 2008
Hello,
I would like to propose that, for Ada, the default lower bound of subrange
types would be 1. I did an audit of one of the very large applications
that we have access to, and found the following:
I found 116,495 subrange types that had a lower-bound defined. Out of
all these entries, a whopping 94,652 of them had the lower bound defined
to 1. Only 17,694 of them had the lower bound defined to 0. The delta
is 4,149 whose lower bound is neither 0 or 1. So it seems that it would
be more advantageous for Ada to define 1 as the default lower bound.
I therefore propose the following change in the standard. From:
> If the lower bound value is missing, the value is assumed to be a
> language-dependent default constant. The default lower bound value for
> C or C++ is 0. For Fortran, it is 1.
Into:
> If the lower bound value is missing, the value is assumed to be a
> language-dependent default constant. The default lower bound value for
> C or C++ is 0. For Ada and Fortran, it is 1.
Thank you,
--
Joel
More information about the Dwarf-discuss
mailing list