To: J3 10-223 From: John Reid, Bill Long Subject: Interop TR: Requirement 2 Date: 2010 October 07 References: 10-165r2, ISO/IEC 1539-1:2010, N1820, 10-203r1 DISCUSSION Requirement 2 of N1820 is If it is reasonably feasible, a mechanism should be provided for C function to specify by explicit declaration the type or rank (both preferred) of an assumed-shape, allocatable, or pointer object. The objective is to provide a facility for type and rank safety. This can be done by adding an extra function. The edits assume that the typedefs introduced in 10-203r1 are available. EDITS to 10-165r2: [11:3] Change "Eight" to "Six". [11:9] Change the line to "If an error occurs during execution of the function that returns an int value, the returned value is". [12:13+] Add new section: 5.2.6.3a int CFI_descriptor ( CFI_cdesc_t *, const CFI_type_t type, const CFI_rank_t rank, const CFI_attribute_t attribute ); <> CFI_descriptor specifies the value of a C descriptor. The type of the object is specified by type; its value shall be that of one of the macros of Table 5.2. The rank is specified by rank; its value shall be in the range 0<=rank<=15. The object is assumed-shape, allocatable, or a pointer according to the value of attribute; this shall be that of one of the macros of Table 5.1. The base address of the object shall be NULL.