09-164 To: J3 From: Van Snyder Subject: Definition and undefinition Date: 2009 March 27 References: 09-007r1 1. Discussion Two cases of pointer component default initialization involving BLOCK constructs are missing from 16.5.2.3 and 16.5.2.4. Several cases of pointer undefinition are not enumerated in 16.5.2.5. 16.5.2 needs subclauses about initially defined and initially undefined association status of pointers, parallel to 16.6.3 and 16.6.4. 2. Edits [451:9- 16.5.2.3-]------------------------------------------------------ Editor: Insert the following subclauses: "16.5.2.2a Pointers with association status initially defined The following pointers have an initially defined association status: (1) pointers specified to have an initial association status by DATA statements; (2) pointers specified to have an initial association status by type declaration statements; (3) default initialized pointer subcomponents of saved nonpointer nonallocatable variables. 16.5.2.2b Pointers with association status initially undefined The initial association status of all other pointers is undefined." [451:14+ 16.5.2.3p1(2)+]------------------------------------------------ Editor: Insert the following list item: "(2a) The pointer is a subcomponent of a pointer or allocatable object, the object is allocated and SOURCE= appears in the ALLOCATE statement, and the corresponding subcomponent of the source is associated." [451:20+ 16.5.2.3p1(4)(b) after its first line] and [451:32+ 16.5.2.4p1(4)(b) after its first line]------------------------- Editor: Insert the same list item (before "or") in both cases "(b') a BLOCK construct with this object as an unsaved nonpointer nonallocatable construct entity of the construct is executed," [451:27 16.5.2.4p1(3)]-------------------------------------------------- Editor: Delete "or" at the end of item (3) and insert the following list item: "(3a) the pointer is a subcomponent of a pointer or allocatable object, the object is allocated and SOURCE= appears in the ALLOCATE statement, and the corresponding subcomponent of the source is disassociated, or" [452:14 16.5.2.5p1(8)]-------------------------------------------------- Editor: Insert "an instance of" before "a procedure" (compare to [459:14 16.6.6p1(3)]. [452:26-30 16.5.2.5p1(11-12)]------------------------------------------- Editor: Replace the list items: " (11) the pointer is a subcomponent of a pointer or allocatable object, the object is allocated, and either the pointer is not default-initialized and SOURCE= does not appear, or SOURCE= appears and the association status of the corresponding subcomponent of the source is undefined, (12) a procedure is invoked and (a) the pointer is a nonsaved local entity of that procedure, (b) the pointer is a subcomponent of a nonsaved nonpointer nonallocatable local entity of that procedure and the pointer is not default initialized, (c) the pointer is an actual argument corresponding to a dummy argument of that procedure that has INTENT(OUT), or (d) the pointer is a subcomponent of an object, the pointer is not default initialized, and the object is an actual argument corresponding to a dummy argument of that procedure that has INTENT(OUT), or (13) a BLOCK statement of a BLOCK construct is executed and (a) the pointer is a nonsaved local entity of that construct, or (b) the pointer is a subcomponent of a nonsaved nonpointer nonallocatable local entity of that construct and the pointer is not default initialized. " [89:7 5.2.3p1]---------------------------------------------------------- OPTIONAL I don't think we say this explicitly anywhere. If we do, it should be here instead of wherever it is. Before "A variable" insert "Initialization is a property an entity has when the program begins execution, not a process that occurs every time a procedure is invoked or the BLOCK statement of a BLOCK construct is executed. " Then start a new paragraph (which ought to be done even if the above is not inserted).