J3/03-120r1 To: J3 From: Toon Moene Subject: Edits for UK comment MTC11 (Separate C data & procedure pointers) Date: 2-apr-2003 Comment MTC11 of the UK vote was: Have separate types for C data and procedure pointers. Function C_LOC operates on either pointers or functions. In C, pointers and functions are separate and it is confusing to mix them in Fortran. There should be a separate type C_FUNPTR for C function pointers. Edits related to the specification of the C_LOC function are moved to paper 03-105r2. Edits to add C_FUNPTR and C_NULL_PTR elsewhere in section 15 are in this paper. Here are the edits for this: 381:14. Change "C_PTR and C_NULL_PTR" to "C_PTR, C_FUNPTR, C_NULL_PTR and C_NULL_FUNPTR". 382:9 Replace the line by "The entities C_PTR and C_FUNPTR are described in 15.2.2.". 382:11. Add to end of paragraph "The entity C_NULL_FUNPTR shall be a named constant of type C_FUNPTR. The value of C_FUNPTR shall be that of a null pointer to a function in C." {We could come right out and say something like "(int (*)(void))0", but that seems unnecessary.} 383:16. Change "C_PTR" to "C_PTR or C_FUNPTR". 383:17. Change "type C_PTR" to "the same type as C_PTR_1". 386:2-3. Replace by C_PTR and C_FUNPTR shall be derived types with private components. C_PTR is interoperable with any C object pointer type. C_FUNPTR is interoperable with any C function pointer type. 386:3+2. Change "required to have the same representation method for all C pointer types" to "required to have the same representation method for all C object pointer types and the same representation method for all C function pointer types". 386:3+10. Change "C_PTR" to "C_FUNPTR or C_PTR". 387:5+4. Change "C_PTR" to "C_FUNPTR or C_PTR".