To: J3 Members J3/16-144r1 From: Van Snyder Subject: Comments on or concerning Clause 16 Reference: 16-007 Date: 2016 February 09 1. Edits ======== [497:32 16.5.2.7p1] After "defined or" insert "become". {"undefined" is not a verb; the verb form is "become undefined".} [498:21 16.5.3.2p2(5)] Delete "with no type parameters" because sequence types cannot have type parameters. [502:2 16.6.4p1] Replace "All other variables" with "Variables other than those that are initially defined". {Clearer.} [502:16 16.6.5p1(6)] Replace "the entire dummy argument" with "an entire dummy". {We usually say "dummy argument" or "dummy data object" but not "dummy argument data object". We haven't established one to be under discussion yet, so we need "an" instead of "the".} [502:17 16.6.5p1(6)] Replace "dummy argument" with "data object". {We don't know it's a data object until we reach the end of the sentence. Don't need to say "dummy data object" because by now it's obvious which object is under discussion.} [503:6 16.6.5p1(18)] After "zero-sized array" insert "or zero-length character variable", after "causes the array" insert "or variable". This makes the item read: "Allocation of a zero-sized array or zero-length character variable causes the array or variable to become defined." {Subclause was silent about zero character length allocatable variables, which also need to become defined when they are allocated -- because they become undefined when they are deallocated.} [503:12 16.5.6p1(21)] After "zero size" insert "or zero character length". {Subclause was silent about zero character length automatic variables, which also need to become defined when a procedure is invoked -- because they become undefined when execution of the procedure completes.} [506:15 16.6.7p1(11)] After "associate name" insert "or any subobject thereof". {Needs to be said, but similar explicit attention to "subobject" is not needed in other list items.} 2. Questions without edits ========================== [496:26 16.5.2.5p1(2)] A pointer's association status becomes undefined if the pointer is pointer assigned to a target on a different image. In light of C726, is this possible? Might it happen by intrinsic derived-type assignment of objects that have pointer components? {Derived-type assignment might cause an assignment not prohibited by C726, so this item is necessary.} [498:21 16.5.3.2p2(5)] Should "length" be inserted before "type parameters"? {Sequence types cannot have any length parameters, so a different edit appears above.} 3. Edits from 16-144 not done ============================= Discussion of reasons for not pursuing these items was too long and varied to be written here, and besides I've forgotten some of the reasons. [3:17 1.3.8.1] After "12.5.2" insert ", 16.5.1.2". [3:25 1.3.8.3] Before "16.5.1.4" insert "12.4.3.4,". [3:44 1.3.8.9] After "11.2.2" insert ", 16.5.1.3". [283:1- NOTE 11.12+] Insert a note: "NOTE 11.12a Use association is further explained in 16.5.1.3." [290:6+ 12.4.3.4 R1211-] Insert a sentence of initial waffle, so we have a place for a cross reference to 16.5.1.4, where important material concerning host association appears: "An IMPORT statement causes names to be accessible by host association (16.5.1.4)." [303:1- NOTE 12.24+] Insert a note: "NOTE 12.24a Argument association is further explained in 16.5.1.2." [490:13+ 16.4p1+] Insert a paragraph: "An identifier of a statement or construct entity has a scope of the statement or construct. Statement or construct entities are not accessible outside their statement or construct." {Compare the above to [492:36].} [492:penultimate line NOTE 16.5] Before "in an ASYNCHRONOUS..." insert "only". [493:9 16.5.1.4p5] After "module" insert "where its type and type parameters are established or accessible". {Currently doesn't distinguish the case of a function name declared by an EXTERNAL or PROCEDURE statement, but the result type or interface is not specified.} [493:10 16.5.1.4p5] Append a sentence: "The type and type parameters of a function are accessible in a module if they are established in that module or accessed by use association from a module where its type and type parameters are accessible." [493:13 16.5.1.4p6] After "module" insert "where its intrinsic nature is established or accessible". {Maybe not needed.} [493:14 16.5.1.4p6] Append a sentence: "The intrinsic nature of a function is accessible in a module if it is established in that module or accessed by use association from a module where its intrinsic nature is accessible." {Maybe not needed.} [495:0+3 NOTE 16.9] Replace "were used" with "appear". [495:13 16.5.2.2p1 ] Append a sentence: "An action that causes a pointer's association status to become undefined does not imply that it was previously defined. An action that causes a pointer's association status to become defined does not imply that it was previously undefined. An action that causes a pointer to become associated does not imply that the pointer was previously disassociated. An action that causes a pointer to become disassociated does not imply that the pointer was previously associated." {Compare to 16.6.1p1 at [501:4-6] where a similar description concerning the definition status of variables was apparently considered to be important.} [495:14- NOTE 16.10 last line] Replace "pointer" with "pointer's association status to become undefined because its". [496:31 16.5.2.5p1(8)] After "instance of" insert "the target of". {Compare to 16.6.6p1(23) at [505:28] where "target of" was apparently considered to be important.} [498:9-10 16.5.3.2p1] After "numeric storage unit" insert "(13.9.2.19)". After "character storage unit" insert "(13.9.2.5)". After "file storage unit" insert "(13.9.2.10)". {Subclause 13.9.2 has become large enough to benefit from more precise cross references.} [498:35+ 16.5.3.2p4+] Insert a NOTE "NOTE 16.10a Different storage units might be the same size." [500:27 16.5.5p5] Insert a list item: "o If the associating entity is polymorphic and the pre-existing entity is allocatable and not allocated or a pointer that is disassociated, the dynamic type of the associating entity is its declared type." {This is important for EXTENDS_TYPE_OF and SAME_TYPE_AS.} [500:31 16.5.5p5] Append a sentence: "If the association is argument association and the lower bound of a dimension is not specified, the lower bound of that dimension of the associating entity is one and the upper bound is one less than the extent in that dimension of the pre-existing entity." {Many people who have not read Clause 6 at approximately the same time expect the dummy argument's lower bound to be the same as the actual argument's lower bound.} [501:13 16.6.1p6+] Insert a paragraph: "A subobject might be defined even if the object is undefined." {Needs to be said.} [502:24+ 16.6.5p1(9)+] Insert a list item: "(8a) Execution of a wait operation (9.7.1) corresponding to an asynchronous input statement causes the input list items or variables in the namelist group for which input is provided to become defined." {16.6.6p1(18) at [505:11-14] says they become undefined when the input statement begins execution. Presumably, they do become defined, but we should say when.} [502:35 16.6.5p1(12)] Replace "an unspecified" with "a nonpointer unspecified". After "storage units" insert "of the same dynamic type and with the same type parameter values". {16.5.3.2 lists three kinds of unspecified storage units.} [503:6 16.6.5p1(18)] Replace "array" with "object" {To cover the case of zero-length strings (and maybe derived-type objects that have no components and no length parameters).} [503:12 16.6.5p1(21)] Replace "automatic" with "nonsaved local". {To cover the case of zero-length arrays and zero-length strings that are not automatic.} [504:5 16.6.6p1(3)(b)] Replace "unsaved variables in a" with "variables in an unsaved". {It's common blocks, not the variables in them, that get the SAVE attribute specified.} [505:31 16.6.6p1(24)] After "assignment" insert "to a variable". Delete first "the". {It's variables, not types, that become defined.} [505:33+ 16.6.6p1(24)+] Insert a list item: "(24a) Execution of an intrinsic assignment to a variable that has subobjects of type C_PTR or C_FUNPTR from the intrinsic module ISO_C_BINDING in which the variable and are on different images causes those subobjects to become undefined." {16.6.6p1(24) does not cover this case.} [506:15+ 16.6.7p1(11)+] Insert a list item: "(11a) a subobject of a that is a selector in a SELECT TYPE or ASSOCIATE construct if the corresponding subobject of the associate name appears in a variable definition context;" {Needs to be said. Answer to an interp concerning C801 (its number in 16-007) didn't also edit here.} 4. To be addressed in different papers ====================================== [504:10+ 16.6.6p1(4)+] Insert a list item: "(4a) When an end-of-record condition occurs during execution of a nonadvancing input statement and the pad mode is NO, list items for which corresponding edit descriptors require more characters than the record contains become undefined." {This is the answer proposed in an interp presented at this meeting. Maybe the interp should just be edits to 9.11.4p1(1)(b). 9.11.4p1(1)(b) just says "the input list item becomes undefined." It doesn't say which one or ones. Nothing appears in 16.6.6 to address that undefinition.} [496:31 16.5.2.5p1(5)] How can an object without the TARGET attribute be pointer associated with anything, let alone the TO argument of the MOVE_ALLOC subroutine? Is this about a dummy argument that has the TARGET attribute but the actual argument does not? [505:20-21 16.6.6p1(21)] How can an object without the TARGET attribute be pointer associated with anything? Is this about a dummy argument that has the TARGET attribute but the actual argument does not? {These items are broken; they will be repaired in a different paper.}