AI22-0098-1

!standard 4.5.2(9.8/6)                                    24-03-04  AI22-0098-1/01

!standard 10.2.1(18/6)

!class presentation 24-03-04

!status Corrigendum 1-2022  24-03-04

!status work item 24-03-04

!status received 24-03-04

!priority Low

!difficulty Easy

!subject More presentation fixes

!summary

Additional presentation improvements to the RM.

!issue

(1) 4.5.2(9.8/6) ends with the standard generic boilerplate in the singular form: “This rule applies also ...”. But this paragraph now has three sentences; each of the sentences describes a different prohibition. Should the boilerplate be given in the plural form? (Yes.)

(2) 10.2.1(18/3) was broken into bullets by AI22-0023-1 to improve its readability. But when that was done, the last sentence of 10.2.1(18/3) was omitted. Should this sentence still be in the RM? (Yes.)

!recommendation

[Editor’s note: These fixes have been applied to Draft 2 of the Ada 202y RM, as they are simple and noticed during the creation of that draft. Editorials are generally applied to AIs that have not yet been approved by WG 9; but AIs that have been approved need a separate update.]

(1) Give the boilerplate in the plural form.

(2) Restore the missing sentence.

!wording

Modify 4.5.2(9.8/6):

If the profile of an explicitly declared primitive equality operator of an untagged record type is type conformant with that of the corresponding predefined equality operator, the declaration shall occur before the type is frozen. In addition, no type shall have been derived from the untagged record type before the declaration of the primitive equality operator. If the untagged record type is declared immediately within the visible part of a package, and the overriding primitive equality operator is explicitly declared within the private part of the package, the operator shall be subtype conformant with the predefined or inherited operator that it overrides. In addition to the places where Legality Rules normally apply (see 12.3), {these rules}[this rule applies] also {apply }in the private part of an instance of a generic unit.

Modify 10.2.1(18/6):

If a library unit is declared pure, then the implementation is permitted to omit a call on a library-level subprogram of the library unit if the results are not needed after the call. In addition, the implementation may omit a call on such a subprogram and simply reuse the results produced by an earlier call on the same subprogram, provided that:

{Redundant:[This permission applies even if the subprogram produces other side effects when called.]}

!discussion

(1) There are clearly three (related) rules, so the boilerplate should be plural. We also move the “also”; the boilerplate does appear in the RM both as “also applies” and “applies also”; the former seems more natural to the editor.

(2) It appears to be an oversight that the last, redundant, sentence was omitted. If it was important enough to state explicitly in Ada 95 (and Ada 2022), it probably still is. An alternative would be to make it a note or usage advice, but we opt for the least change and just replace it after the bullets.

!example

None needed for presentation issues.

!corrigendum 4.5.2(9.8/6)

@drepl

If the profile of an explicitly declared primitive equality operator of an untagged record type is type conformant with that of the corresponding predefined equality operator, the declaration shall occur before the type is frozen. In addition, no type shall have been derived from the untagged record type before the declaration of the primitive equality operator. If the untagged record type is declared immediately within the visible part of a package, and the overriding primitive equality operator is explicitly declared within the private part of the package, the operator shall be subtype conformant with the predefined or inherited operator that it overrides. In addition to the places where Legality Rules normally apply (see 12.3), this rule applies also in the private part of an instance of a generic unit.

@dby

If the profile of an explicitly declared primitive equality operator of an untagged record type is type conformant with that of the corresponding predefined equality operator, the declaration shall occur before the type is frozen. In addition, no type shall have been derived from the untagged record type before the declaration of the primitive equality operator. If the untagged record type is declared immediately within the visible part of a package, and the overriding primitive equality operator is explicitly declared within the private part of the package, the operator shall be subtype conformant with the predefined or inherited operator that it overrides. In addition to the places where Legality Rules normally apply (see 12.3), these rules also apply in the private part of an instance of a generic unit.

!corrigendum 10.2.1(18/6)

@drepl

If a library unit is declared pure, then the implementation is permitted to omit a call on a library-level subprogram of the library unit if the results are not needed after the call. In addition, the implementation may omit a call on such a subprogram and simply reuse the results produced by an earlier call on the same subprogram, provided that:

@xbullet{none of the parameters nor any object accessible via access values from the parameters have any part that is of a type whose full type is an immutably limited type; and}

@xbullet{the addresses and values of all by-reference actual parameters, the values of all by-copy-in actual parameters, and the values of all objects accessible via access values from the parameters, are the same as they were at the earlier call.}

@dby

If a library unit is declared pure, then the implementation is permitted to omit a call on a library-level subprogram of the library unit if the results are not needed after the call. In addition, the implementation may omit a call on such a subprogram and simply reuse the results produced by an earlier call on the same subprogram, provided that:

@xbullet{none of the parameters nor any object accessible via access values from the parameters have any part that is of a type whose full type is an immutably limited type; and}

@xbullet{the addresses and values of all by-reference actual parameters, the values of all by-copy-in actual parameters, and the values of all objects accessible via access values from the parameters, are the same as they were at the earlier call.}

This permission applies even if the subprogram produces other side

effects when called.

!ACATS test

No ACATS tests should be needed for presentation changes.

!appendix