To: J3 J3/21-108r1 From: Bill Long & Malcolm Cohen Subject: Definition status of allocated pointer object Date: 2021-February-20 Reference: 21-007 Discussion: ----------- In 19.5.2.8 Relationship between association status and definition status, we have the sentence in 21-007: "When a pointer is allocated, it becomes associated but undefined." But if the ALLOCATE statement that allocates the pointer has a SOURCE= specifier, the sentence in 19.5.2.8 seems incorrect. Similarly, there are features like zero-sized arrays, zero-sized strings, and component initialization, which all falsify that sentence. In fact, the entirety of 19.5.2.8 is redundant or wrong. The first sentence follows trivially from the requirements specified in 8.5.14 POINTER attribute (which has much more stringent requirements!). The second sentence is untrue - INTENT(IN) pointers cannot be nullified, pointer-assigned or allocated. The third sentence is redundant with the NULLIFY statement description. The fourth sentence (the one we're looking at) is, where it is not wrong, redundant with ALLOCATE and 19.5.2.1. The final sentence is nonsense for procedure pointers and follows trivially from 19.5.2.1 for data pointers. Finally, the subclause claims to be about the relationship between association status and definition status, but just lists a bunch of random stuff. The relationship between association status and definition status is specified completely in 19.5.2.1, which says "If a pointer is associated with a target, the definition status of the pointer is either defined or undefined, depending on the definition status of the target." Admittedly this itself could be simplified to "The definition status of an associated data pointer is that of its target." And that would be a good thing, to stop talking about the definition status of procedures! Edits to 21-007 ---------------- [524:7-9] 19.5.2.1 General (in 19.5.2 Pointer association), p1, Change "If a pointer is associated with a target, the definition status of the pointer is either defined or undefined, depending on the definition status of the target." to "The definition status of an associated data pointer is that of its target." {Simplify sentence and don't say that procedure pointers have a definition status.} [527:1-5] 19.5.2.8 Relationship between association status and definition status, Delete entire subclause. {Redundant, wrong, redundant, and unhelpful.} ===END===