CVS difference for ais/ai-10291.txt

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

--- ais/ai-10291.txt	2004/12/09 18:58:34	1.1
+++ ais/ai-10291.txt	2005/04/13 05:37:27	1.2
@@ -1,4 +1,4 @@
-!standard 13.01 (7)                                  04-12-07  AI95-00291-02/02
+!standard 13.01 (7)                                  05-04-01  AI95-00291-02/04
 !standard 13.01 (18.1/1)
 !standard 13.01 (21)
 !standard 13.01 (24)
@@ -8,11 +8,15 @@
 !standard 13.03 (23)
 !standard 13.03 (24)
 !standard 13.03 (25)
-!standard 13.03 (26)
 !standard 13.03 (28)
+!standard 13.03 (32)
+!standard 13.03 (34)
 !standard 13.03 (43)
 !standard 13.03 (56)
 !class binding interpretation 04-10-05
+!status Amendment 200Y 05-02-13
+!status WG9 Approved (Letter ballot, 05-01)
+!status ARG Approved 4-0-6  05-02-13
 !status work item 04-11-20
 !status received 04-10-05
 !qualifier Error
@@ -49,17 +53,16 @@
 
 Replace 13.1(7) with the following:
 
-    The *representation* of an objects consists of a certain number of bits
-    (the *size* of the object).  For an object of an elementary type, these
+    The *representation* of an object consists of a certain number of bits
+    (the *size* of the object). For an object of an elementary type, these
     are the bits that are normally read or updated by the machine code
-    when loading, storing, or operating-on the value of the object.  For an
+    when loading, storing, or operating-on the value of the object. For an
     object of a composite type, these are the bits reserved for this object,
-    and include bits occupied by subcomponents of the object.  If the
+    and include bits occupied by subcomponents of the object. If the
     size of an object is greater than that of its subtype, the additional
-    bits are padding bits.  For an elementary object, these padding
-    bits are normally read and updated along with the others.  For a composite
-    object, composite operations are generally defined in terms of
-    operations on components, so padding bits might not be read or updated
+    bits are padding bits. For an elementary object, these padding
+    bits are normally read and updated along with the others. For a composite
+    object padding bits might not be read or updated
     in any given composite operation, depending on the implementation.
 
 Insert after 13.1(18.1/1)
@@ -139,25 +142,33 @@
     X'Alignment is a nonzero integral multiple of S'Alignment unless
     specified otherwise by a representation item.
 
-Insert after 13.3(25) (note that AI247 deleted 13.3(26))
+Replace 13.3(28) with
+
+    For an object that is not allocated under control of the
+    implementation, execution is erroneous if the object is not
+    aligned according to its Alignment.
 
-    An implementation need not support an Alignment specified for a
+Insert after 13.3(32)
+
+  * An implementation need not support an Alignment specified for a
     derived tagged type which is not a multiple of the Alignment
     of the parent type. An implementation need not support a
     nonconfirming Alignment specified for a derived untagged
     by-reference type.
 
+Delete 13.3(34)
+
+Insert after 13.3(35)
+
+    For other objects, an implementation should at least
+    support the alignments that supported for their
+    subtype, subject to the following:
+
     An implementation need not support Alignments specified for
     objects of a by-reference type or for objects of types containing
     aliased subcomponents if the specified Alignment is not
     a multiple of the Alignment of the object's subtype.
 
-Replace 13.3(28) with
-
-    For an object X that is not allocated under control of the
-    implementation, execution is erroneous if the object is not
-    aligned according to its Alignment.
-
 In 13.3(43) replace
     "A Size clause should be supported for an object if ..."
 with
@@ -225,6 +236,215 @@
 might apply. Implementations can refer to the new overarching
 permission to justify the restriction in any given compiler error
 message.
+
+!example
+
+!corrigendum 13.1(7)
+
+@drepl
+The @i<representation> of an object consists of a certain number of bits (the
+@i<size> of the object). These are the bits that are normally read or updated
+by the machine code when loading, storing, or operating-on the value of the
+object. This includes some padding bits, when the size of the object is greater
+than the size of its subtype. Such padding bits are considered to be part of
+the representation of the object, rather than being gaps between objects, if
+these bits are normally read and updated.
+@dby
+The @i<representation> of an object consists of a certain number of bits (the
+@i<size> of the object). For an object of an elementary type, these are the
+bits that are normally read or updated by the machine code when loading,
+storing, or operating-on the value of the object. For an object of a composite
+type, these are the bits reserved for this object, and include bits occupied by
+subcomponents of the object. If the size of an object is greater than that of
+its subtype, the additional bits are padding bits. For an elementary object,
+these padding bits are normally read and updated along with the others. For a
+composite object padding bits might not be read or updated in any given
+composite operation, depending on the implementation.
+
+!corrigendum 13.1(18.1/1)
+
+@dinsa
+If an operational aspect is @i<specified> for an entity (meaning that it is
+either directly specified or inherited), then that aspect of the entity is as
+specified. Otherwise, the aspect of the entity has the default value for that
+aspect.
+@dinst
+A representation item that specifies an aspect of representation that would
+have been chosen in the absence of the representation item is said to be
+@i<confirming>.
+
+!corrigendum 13.1(21)
+
+@dinsa
+The recommended level of support for all representation items is qualified as
+follows:
+@dinst
+@xbullet<A confirming representation item should be supported.>
+
+!corrigendum 13.1(24)
+
+@drepl
+@xbullet<An aliased component, or a component whose type is by-reference,
+should always be allocated at an addressable location.>
+@dby
+@xbullet<An implementation need not support a nonconfirming representation item
+if it could cause an aliased object or an object of a by-reference type to be
+allocated at a nonaddressable location or, when the alignment attribute of the
+subtype of such an object is nonzero, at an address that is not an integral
+multiple of that alignment.>
+@xbullet<An implementation need not support a nonconfirming representation item
+if it could cause an aliased object of an elementary type to have a size other
+than that which would have been chosen by default.>
+@xbullet<An implementation need not support a nonconfirming representation item
+if it could cause an aliased object of a composite type, or an object whose
+type is by-reference, to have a size smaller than that which would have been
+chosen by default.>
+@xbullet<An implementation need not support a nonconfirming subtype-specific
+representation item specifying an aspect of representation of an indefinite or
+abstract subtype.>
+For purposes of these rules, the determination of whether a representation item
+applied to a type @i<could cause> an object to have some property is based
+solely on the properties of the type itself, not on any available information
+about how the type is used. In particular, it presumes that minimally aligned
+objects of this type might be declared at some point.
+
+!corrigendum 13.2(6)
+
+@dinsa
+If a type is packed, then the implementation should try to minimize storage
+allocated to objects of the type, possibly at the expense of speed of accessing
+components, subject to reasonable complexity in addressing calculations.
+@dinst
+If a packed type has a component which is not of a by-reference type and has no
+aliased part then such a component need not be be aligned according to the
+Alignment of the component's subtype; in particular it need not be allocated on
+a storage element boundary.
+
+!corrigendum 13.3(18)
+@ddel
+@xbullet<Objects (including subcomponents) that are aliased or of a
+by-reference type should be allocated on storage element boundaries.>
+
+!corrigendum 13.3(22/1)
+
+@drepl
+For a @fa<prefix> X that denotes a subtype or object:
+@dby
+For a @fa<prefix> X that denotes an object:
+
+!corrigendum 13.3(23)
+
+@drepl
+@xhang<@xterm<X'Alignment>
+The Address of an object that is allocated under control of the implementation
+is an integral multiple of the Alignment of the object (that is, the Address
+modulo the Alignment is zero). The offset of a record component is a multiple
+of the Alignment of the component. For an object that is not allocated under
+control of the implementation (that is, one that is imported, that is allocated
+by a user-defined allocator, whose Address has been specified, or is designated
+by an access value returned by an instance of Unchecked_Conversion), the
+implementation may assume that the Address is an integral multiple of its
+Alignment. The implementation shall not assume a stricter alignment.>
+@dby
+@xhang<@xterm<X'Alignment>
+The value of this attribute is of type @i<universal_integer>, and nonnegative;
+zero means that the object is not necessarily aligned on a storage element
+boundary. If X'Alignment is not zero, then X is aligned on a storage unit
+boundary and X'Address is an integral multiple of X'Alignment (that is, the
+Address modulo the Alignment is zero).>
+
+!corrigendum 13.3(24)
+
+@ddel
+@xindent<The value of this attribute is of type @i<universal_integer>, and
+nonnegative; zero means that the object is not necessarily aligned on a storage
+element boundary.>
+
+!corrigendum 13.3(25)
+
+@drepl
+@xindent<Alignment may be specified for first subtypes and stand-alone objects
+via an @fa<attribute_definition_clause>; the expression of such a clause shall
+be static, and its value nonnegative. If the Alignment of a subtype is
+specified, then the Alignment of an object of the subtype is at least as
+strict, unless the object's Alignment is also specified. The Alignment of an
+object created by an allocator is that of the designated subtype.>
+@dby
+@xindent<Alignment may be specified for stand-alone objects via an
+@fa<attribute_definition clause>; the expression of such a clause shall be
+static, and its value nonnegative.>
+
+For every subtype S:
+
+@xhang<@xterm<S'Alignment>
+The value of this attribute is of type @i<universal_integer>, and nonnegative.>
+
+@xindent<For an object X of subtype S, if S'Alignment is not zero, then
+X'Alignment is a nonzero integral multiple of S'Alignment unless specified
+otherwise by a representation item.>
+
+!corrigendum 13.3(28)
+
+@drepl
+If the Alignment is specified for an object that is not allocated under control
+of the implementation, execution is erroneous if the object is not aligned
+according to the Alignment.
+@dby
+For an object that is not allocated under control of the implementation,
+execution is erroneous if the object is not aligned according to its Alignment.
+
+!corrigendum 13.3(32)
+
+@dinsa
+@xbullet<An implementation need not support specified Alignments that are
+greater than the maximum Alignment the implementation ever returns by default.>
+@dinst
+@xbullet<An implementation need not support an Alignment specified for a
+derived tagged type which is not a multiple of the Alignment of the parent
+type. An implementation need not support a nonconfirming Alignment specified
+for a derived untagged by-reference type.>
+
+!corrigendum 13.3(34)
+
+@ddel
+@xbullet<Same as above, for subtypes, but in addition:>
+
+!corrigendum 13.3(35)
+
+@dinsa
+@xbullet<For stand-alone library-level objects of statically constrained
+subtypes, the implementation should support all Alignments
+supported by the target linker. For example, page alignment
+is likely to be supported for such objects, but not for subtypes.>
+@dinst
+@xbullet<For other objects, an implementation should at least
+support the alignments that supported for their
+subtype, subject to the following:>
+
+@xbullet<An implementation need not support Alignments specified for objects of
+a by-reference type or for objects of types containing aliased subcomponents if
+the specified Alignment is not a multiple of the Alignment of the object's
+subtype.>
+
+
+!corrigendum 13.3(42)
+!comment The change really is here, once we handle the conflict with AI-51-2.
+!comment !corrigendum 13.3(43)
+
+@dprepl
+A Size clause should be supported for an object
+@dby
+A nonconfirming Size clause should be supported for an object (excepting
+aliased elementary objects)
+
+!corrigendum 13.3(56)
+
+@dinsa
+@xbullet<For a subtype implemented with levels of indirection, the Size should
+include the size of the pointers, but not the size of what they point at.>
+@dinst
+@xbullet<A nonconfirming size clause for the first subtype of a derived
+untagged by-reference type need not be supported.>
 
 !ACATS test
 

Questions? Ask the ACAA Technical Agent