To: J3 J3/15-207r1 From: Steve Lionel Subject: C descriptors Date: 2015 August 06 Reference: 15-007r1, 15-200r2 Introduction ------------ Paragraph 4 of 15.3.7 (Interoperability of procedures and procedure interfaces) says (as amended by 15-192r2): "In a reference from C to a procedure with an interoperable interface, if a dummy argument is allocatable, assumed shape, assumed-rank, or a pointer, the corresponding actual argument in C shall be the address of a C descriptor for the intended effective argument. In this C descriptor, the members other than attribute and type shall describe an object with the same characteristics as the intended effective argument." The first sentence attempts to summarize the situations where a C descriptor is used to pass an argument, laid out in more detail in 15.3.7p2, but omits the case from 461:18-19: "the dummy argument is a nonallocatable nonpointer variable of type CHARACTER with assumed character length" One also observes that the summary misses additional details from the preceding text, such as that a pointer with the CONTIGUOUS attribute is not passed by C descriptor. In general we try not to say things twice as that almost guarantees one of them will be wrong... The text for p4 should be revised to eliminate the redundancy. Edits are supplied below. Edits ----- [461:29-31, 15.3.7p4] Interoperability of procedures and procedure interfaces Replace the first sentence "In a reference from C..." with: "In a reference from C to a Fortran procedure with an interoperable interface, the C actual argument shall be the address of a C descriptor for the intended effective argument if the dummy argument corresponds to a C formal argument of a pointer to CFI_cdesc_t." This edit supersedes the first edit in 15-200r2.