CVS difference for ais/ai-00320.txt

Differences between 1.2 and version 1.3
Log of other versions for file ais/ai-00320.txt

--- ais/ai-00320.txt	2003/03/04 04:56:23	1.2
+++ ais/ai-00320.txt	2004/07/27 23:00:58	1.3
@@ -1,5 +1,7 @@
-!standard  B.1  (49)                                   03-02-18  AI95-00320/02
+!standard  B.1  (49)                                   04-07-02  AI95-00320/03
 !class binding interpretation 03-01-02
+!status Amendment 200Y 04-07-02
+!status ARG Approved 8-0-0  04-06-17
 !status work item 03-01-02
 !status received 03-01-02
 !qualifier Omission
@@ -36,30 +38,31 @@
 
 Add after B.1(38):
 
-Conventions other than Ada, Intrinsic, entry, and protected
-are known as foreign conventions. The effect of a partition containing a
-pragma Import, pragma Export, or a pragma Convention with a foreign convention
-may differ from that defined by this International Standard.
+Erroneous Execution
 
+It is the programmer's responsibility to ensure that the use of interfacing
+pragmas does not violate Ada semantics; otherwise, program execution is
+erroneous.
+
 !discussion
 
-This wording includes pragma Import and Export for all conventions, including
-Ada. That's necessary as convention only specifies the calling convention,
-while the body of an imported routine (or the caller of an exported routine)
-may be written in any language. And that other language could easily violate
-Ada semantics.
-
-However, we do not want this wording to cover pragma Convention (Ada). If it
-did, a pragma confirming the convention would also allow the compiler to
-violate Ada semantics. We do need to include Convention for foreign
-conventions, as the calling convention may not include the needed support for
-Ada semantics. Imagine an implementation that passes the current innermost
+This wording includes pragma Import, Export, and Convention for all
+conventions, including Ada. That's necessary as Convention only specifies the
+calling convention, while the body of an imported routine (or the caller of an
+exported routine) may be written in any language. And that other language could
+easily violate Ada semantics.
+
+Note the even calling Ada code with a foreign convention may violate
+Ada semantics, a foreign convention may not include needed support for Ada
+semantics. Imagine an implementation that passes the current innermost
 exception handler in a specific register. The C calling convention would
 most likely not pass or save that register, and thus exceptions could not
 propogate through a C convention call, even if both the caller and called
-routine are written in Ada. This seems like a reasonable implementation;
-thus, we must not require pragma Convention with a foreign convention to
-preserve Ada semantics.
+routine are written in Ada. This seems like a reasonable implementation; thus
+it is possible to violate Ada semantics with just a Convention.
+
+The wording makes it the programmer's (and not the implementor's)
+responsibility to use interfacing wisely and safely.
 
 !corrigendum B.1(38)
 
@@ -69,10 +72,11 @@
 Import does not create the entity. Such an elaboration has no other effect than
 to allow the defining name to denote the external entity.
 @dinst
-Conventions other than Ada, Intrinsic, entry, and protected
-are known as @i<foreign conventions>. The effect of a partition containing a
-@fa<pragma> Import, @fa<pragma> Export, or a @fa<pragma> Convention with a
-foreign convention may differ from that defined by this International Standard.
+@i<@s8<Erroneous Execution>>
+
+It is the programmer's responsibility to ensure that the use of interfacing
+pragmas does not violate Ada semantics; otherwise, program execution is
+erroneous.
 
 !ACATS test
 

Questions? Ask the ACAA Technical Agent