J3/14-170 To: J3 From: Van Snyder Subject: Subobjects Date: 2014 June 08 1. Introduction =============== I'm not sure 6.4.2p5 says precisely what we want it to say. Using the notation P# to indicate a that has the POINTER attribute, and N# to indate one that does NOT have the pointer attribute, it seems that N1%N2 and P1%N2 designate subobjects of N1 and (the target of) P1, N1%P2 and P1%P2 designate subobjects only in contexts that pertain to their pointer association, and N1%P2%N3, N1%P2%P3, P1%P2%N3 and P1%P2%P3 never designate subobjects. That's not what 6.4.2p5 says. It says a denotes a subobject if the only that has the POINTER attribute is the rightmost one. That is, N1%N2 denotes a subobject, but P1%N2 does not. I think we want to say something like "rightmost ... and no other except possibly the leftmost are pointers." Further, 6.4.2p5 applies to subobjects only in the context of their designators. It does not pertain to subcomponents of designated objects. In particular, it does not specify that a subcomponent that has the POINTER attribute is not a subobject of a designated object in contexts that apply to the designated object's value. 2. Edits to 14-007r1 ==================== [18:25 1.3.155] Append "; a component that has the POINTER attribute is a subobject in contexts that pertain to its pointer association status, but not in other contexts" [121:21-23 6.4.2p5] Replace 6.4.2p5: "A with more than one is a subobject of its base object if none of the s, except possibly the leftmost and rightmost, are pointers. If the rightmost is a pointer, and no other except possibly the leftmost are pointers, then the designates a subobject of its base object in contexts that pertain to its pointer association status, but not in other contexts." Index this occurrence of "subobject".