[Dwarf-Discuss] default lower bound of DW_TAG_subrange_type for Ada
Joel Brobecker
brobecker at adacore.com
Tue Apr 22 12:09:13 PDT 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