Version 1.1 of ais/ai-00320.txt

Unformatted version of ais/ai-00320.txt version 1.1
Other versions for file ais/ai-00320.txt

!standard B.1 (49)          03-01-02 AI95-00320/01
!class binding interpretation 03-01-02
!status work item 03-01-02
!status received 03-01-02
!qualifier Omission
!priority Low
!difficulty Easy
!subject Violating Ada semantics with an interfacing pragma
!summary
The note B.1(49) ("an interfacing pragma might result in an effect that violates Ada semantics.") is correct.
!question
The minutes of the October 2002 ARG meeting say:
If you violate any Ada semantic requirements in C (by stomping on memory, for instance), all bets are off.
This is clearly a requirement, as the Ada compiler has no control over what the foreign language code can do.
However, the only mention of this in the Standard is a note, B.1(49):
An interfacing pragma might result in an effect that violates Ada semantics.
It appears that the standard needs a normative statement to this effect.
!recommendation
(See Wording.)
!wording
Add after B.1(38):
A convention other than the ones defined by the language in subclause 6.3.1 are known as a foreign convention. The effect of a partition containing an interfacing pragma with a foreign convention may differ from that defined by this International Standard.
!discussion
!corrigendum B.1(38)
Insert after the paragraph:
Notwithstanding what this International Standard says elsewhere, the elaboration of a declaration denoted by the local_name of a pragma Import does not create the entity. Such an elaboration has no other effect than to allow the defining name to denote the external entity.
the new paragraph:
A convention other than the ones defined by the language in subclause 6.3.1 are known as a foreign convention. The effect of a partition containing an interfacing pragma with a foreign convention may differ from that defined by this International Standard.
!ACATS test
We can't usefully test if a compiler does this, as it is a permission, not a requirement.
!appendix

****************************************************************

Questions? Ask the ACAA Technical Agent