ISO/ IEC JTC1/SC22/WG14 N684


      WG14/N684  (J11/97-047)                 WG14/N684  (J11/97-047)

             Edits for Incorporating N640, "Access to Objects" 

                             08 May 1997

                            Tom MacDonald
                            [email protected]

                            655F Lone Oak Road
                            Eagan  MN  55121
                            USA

==================================================================

Changes to the Draft Standard are the following modifications to
section 6.3 Expressions, paragraph [6] beginning "An object shall
have its ...", to read:

   Modify section 6.3, paragraph 7, to read: 

   The effective type of an object for an access to its stored value is the
   declared type of the object, if it has one. If a value is stored into an
   object having no declared type through an lvalue having a type that is
   not a character type, then the type of the lvalue becomes the effective
   type of the object for that access and for subsequent accesses that do
   not modify the stored value. If a value is copied into an object having
   no declared type using *memcpy* or *memmove*, or is copied as an array of
   character type, then the effective type of the modified object for that
   access and for subsequent accesses that do not modify the value is the
   effective type of the object from which the value is copied, if it has
   one. For all other accesses to an object having no declared type, the
   effective type of the object is simply the type of the lvalue used for
   the access.

   An object shall have its stored value accessed only by an lvalue
   expression that has one of the following types:

     -   a type compatible with the effective type of the object,

     -   a qualified version of a type compatible with the effective type
         of the object,

     -   a type that is the signed or unsigned type corresponding to the
         effective type of the object,

     -   a type that is the signed or unsigned type corresponding to a
         qualified version of the effective type of the object,

     -   an aggregate or union type that includes one of the aforementioned
         types among its members (including, recursively, a member of a
         subaggregate or contained union), or

     -   a character type.