To: J3 J3/23-233 From: Malcolm Cohen Subject: Interp: NULL for named procedure pointers Date: 2023-October-18 ---------------------------------------------------------------------- NUMBER: F23/011 TITLE: NULL and procedure pointers KEYWORDS: NULL, procedure pointer DEFECT TYPE: Erratum STATUS: J3 consideration in progress QUESTION: Consider the procedure declaration statement PROCEDURE(), POINTER :: PROCPTR => NULL() The statement appears to violate the requirements of the standard. The function reference does not match any of the conditions listed in Table 16.5. The closest case is "initialization of an object in a declaration", but a procedure pointer is not an object (see 3.42). Therefore, a MOLD argument is required. However, constraint C813 prohibits a MOLD argument from appearing. The same does not apply to default initialization of procedure pointer components in a derived type definition, as component initialization appears in Table 16.5. Is this irregularity deliberate? ANSWER: No, this is not deliberate. Table 16.5 should be extended to include initialization in a procedure declaration statement. An edit is provided. EDIT to N2218 (Fortran 2023 FDIS): [428] 16.9.155 NULL, Result Characteristics, Table 16.5 After the entry "initialization for an object..." insert "initialization for a procedure pointer in a declaration | the procedure pointer". {Not folded into the entry for object initialization as that would make the line too long.} SUBMITTED BY: Robert Corbett & Malcolm Cohen HISTORY: 23-nnn m230 Submitted ----------------------------------------------------------------------