(j3.2006) Subobjects

Van Snyder van.snyder
Sun Jun 1 20:05:42 EDT 2014


One of the important definitions concerning subobjects is at 
[14-007r1:121:21-23] in 6.4.2p5.  It would be helpful if it were indexed.

I'm not sure 6.4.2p5 says precisely what we want it to say.

Using the notation P# to indicate a <part-ref> 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 P1,

N1%P2 and P1%P2 designate subobjects 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 <data-ref> denotes a subobject 
if the only <part-ref> that has the POINTER attribute is the rightmost 
one.  I think we want something more like

    "A <data-ref> with more than one <part-ref> is a subobject of its
    base object if none of the <part-name>s, except possibly for the
    leftmost and rightmost, are pointers.  If the rightmost <part-name>
    is a pointer, and no other <part-name> except possibly for the
    leftmost are pointers, then the <data-ref> designates a subobject of
    its base object in contexts that pertain to its pointer association
    status, but not in other contexts."




More information about the J3 mailing list