CVS difference for ais/ai-00216.txt

Differences between 1.8 and version 1.9
Log of other versions for file ais/ai-00216.txt

--- ais/ai-00216.txt	2002/04/26 20:15:16	1.8
+++ ais/ai-00216.txt	2002/07/23 01:05:23	1.9
@@ -1,5 +1,8 @@
-!standard 03.08.01      (01)                        02-04-17  AI95-00216/07
+!standard B.03.03      (00)                         02-07-11  AI95-00216/08
+!standard B.03         (60.2)
 !class amendment 99-03-23
+!status Amendment 200Y 02-07-11
+!status ARG Approved 6-0-3  02-06-22
 !status work item 99-03-23
 !status received 99-03-23
 !priority Medium
@@ -142,9 +145,9 @@
 The first_subtype_local_name of a pragma Unchecked_Union shall denote
 an unconstrained discriminated record subtype having a variant_part.
 
-The type is said to be an unchecked union type. A subtype of an
-unchecked union type is said to be an unchecked union subtype.
-An object of an unchecked union type is said to be an unchecked union
+The type is called an unchecked union type. A subtype of an
+unchecked union type is defined to have an unchecked union subtype.
+An object of an unchecked union type is defined to have an unchecked union
 object.
 
 All component subtypes of the type shall be C-compatible.
@@ -178,12 +181,12 @@
                 Dynamic Semantics
 
 A view of an unchecked union object [(including a type conversion or
-function call)] is said to have "inferable discriminants" if it has a
+function call)] has "inferable discriminants" if it has a
 constrained nominal subtype, unless the object is a component of an
 enclosing unchecked union object which is subject to a per-object constraint
 and the enclosing object lacks inferable discriminants.
 
-An expression of an unchecked union type is said to have "inferable
+An expression of an unchecked union type has "inferable
 discriminants" if it is either a name of an object with inferable discriminants
 or a qualified expression whose subtype_mark denotes a constrained subtype.
 
@@ -276,6 +279,110 @@
 if such types are going to be used in relatively portable C interfacing
 code with compilers that may share generics.
 
+!corrigendum B.3(60.2/1)
+
+@drepl
+The eligibility rules in B.1 do not apply to convention C_Pass_By_Copy.
+Instead, a type T is eligible for convention C_Pass_By_Copy if T is a record
+type that has no discriminants and that only has components with statically
+constrained subtypes, and each component is C-compatible.
+@dby
+The eligibility rules in B.1 do not apply to convention C_Pass_By_Copy.
+Instead, a type T is eligible for convention C_Pass_By_Copy if T is an
+unchecked union type or if T is a record
+type that has no discriminants and that only has components with statically
+constrained subtypes, and each component is C-compatible.
+
+!corrigendum B.3.3(1)
+
+@dinsc
+A pragma Unchecked_Union specifies an interface correspondence
+between a given discriminated type and some C union. The pragma
+specifies that the associated type shall be given a representation
+that leaves no space for its discriminant(s).
+
+@i<@s8<Syntax>>
+
+The form of pragma Unchecked_Union is as follows:
+
+@xindent<@b<pragma> Unchecked_Union (@i<first_subtype_local_>@fa<name>);>
+
+@i<@s8<Legality Rules>>
+
+Unchecked_Union is a representation pragma, specifying the unchecked
+union aspect of representation.
+
+The @i<first_subtype_local_>@fa<name> of a @fa<pragma> Unchecked_Union shall
+denote an unconstrained discriminated record subtype having a @fa<variant_part>.
+The type called an @i<unchecked union type>. A subtype of an
+unchecked union type is defined to have an @i<unchecked union subtype>.
+An object of an unchecked union type is defined to have an @i<unchecked union
+object>.
+
+All component subtypes of an unchecked union type shall be C-compatible.
+
+If a component subtype of an unchecked union type is subject to a per-object
+constraint, then the component subtype shall be an unchecked union subtype.
+
+Any name which denotes a discriminant of an object of an
+unchecked union type shall occur within the declarative region of the type.
+
+A component declared in a @fa<variant_part> of an unchecked union type shall
+not have a controlled, protected, or task part.
+
+The completion of an incomplete or private type declaration having a
+@fa<known_discriminant_part> shall not be an unchecked union type.
+
+An unchecked union subtype shall not be passed as a generic actual parameter
+if the corresponding formal type has a @fa<known_discriminant_part> or
+is a formal derived type which is not an unchecked union type.
+
+@i<@s8<Static Semantics>>
+
+An unchecked union type is eligible for convention C.
+
+Discriminant_Check is suppressed for an unchecked union type.
+
+All objects of an unchecked union type have the same size.
+
+Discriminants of objects of an unchecked union type are of size zero.
+
+@i<@s8<Dynamic Semantics>>
+
+A view of an unchecked union object (including a type conversion or
+function call) has @i<inferable discriminants> if it has a
+constrained nominal subtype, unless the object is a component of an
+enclosing unchecked union object which is subject to a per-object constraint
+and the enclosing object lacks inferable discriminants.
+
+An expression of an unchecked union type has inferable discriminants if it is
+either a name of an object with inferable discriminants or a qualified
+expression whose @fa<subtype_mark> denotes a constrained subtype.
+
+Program_Error is raised in the following cases:
+
+@xbullet<Evaluation of the predefined equality operator for an unchecked union
+type if either of the operands lacks inferable discriminants. This includes
+the case where the equality operator is invoked implicitly by the equality
+operator for an enclosing composite type - if the unchecked union component
+subtype is unconstrained, Program_Error is raised.>
+
+@xbullet<Evaluation of a membership test if the @fa<subtype_mark> denotes a
+constrained unchecked union subtype and the expression lacks inferable
+discriminants.>
+
+@xbullet<Conversion from a derived unchecked union type to an unconstrained
+non-unchecked-union type if the operand of the conversion lacks inferable
+discriminants.>
+
+@xbullet<Execution of the default implementation of the Write or Read attribute
+of an unchecked union type.>
+
+@xbullet<Execution of the default implementation of the Output or Input
+attribute of an unchecked union type if the type lacks default discriminant
+values.>
+
+
 !appendix
 
 Randy Brukardt  99-03-29
@@ -370,9 +477,9 @@
 The first_subtype_local_name of a pragma Unchecked_Union shall denote
 an unconstrained discriminated record subtype having a variant_part.
 
-The type is said to be an unchecked union type. A subtype of an
-unchecked union type is said to be an unchecked union subtype.
-An object of an unchecked union type is said to be an unchecked union
+The type is defined to have an unchecked union type. A subtype of an
+unchecked union type is defined to have an unchecked union subtype.
+An object of an unchecked union type is defined to have an unchecked union
 object.
 
 All component subtypes of the type shall be C-compatible.

Questions? Ask the ACAA Technical Agent