||Change D.2.2 Ada example to reference upper bound memory directly
The way in which the D.2.2 Ada example describes VEC2's upper bound is not
ideal, because it isn't clear how a consumer would describe the type. It
would require some reverse-engineering to discover that it corresponds to the
discriminant N. That GNAT developers believe there should be a better way.
The Concurrent MAXAda compiler references a member. This does require the
consumer to notice that the referenced member *is* a member, so that it can
evaluate it. But this not a terrible burden. Furthermore, the existing
descriptive form would not be able to describe multiple members (e.g. VEC3,
VEC4, etc.) with bounds determined by discriminant(s) -- at least not with
the MAXAda implementation. The GNAT developers voice concerns about the form
in D.2.2 with their implementation, too.
Ron wrote up some text for changing the example, but since I'm submitting the
proposal, I've taken the liberty of modifying it a bit in the hopes that it
makes it clearer:
In Section D.2.2, second bullet, at the bottom of page 187 in Draft 8 or 9,
replace the second sentence ("It is located...") with:
It is described as a reference to a member, and the location of the
upper bound is determined as for any member. That is, using an address
calculation relative to the base of the containing object.
A consumer must notice that the referenced bound is a member of the
same containing object and implicitly push the base address of the
containing object just as for accessing a data member generally.
In Section D.2.2, Figure 49, page 189 in Draft 8 or 9, replace the upper
bound attribute contained in the subrange type at 29$ with:
DW_AT_upper_bound(reference to member N at 27$)