To: J3 11-113 From: John Reid Subject: Interop: UTI TR3 Date: 2011 January 26 References: N1838, N1844, ISO/IEC 1539-1:2010 DISCUSSION Unresolved Technical Issue TR3 of N1838 points out that people want the rank field of CFI_cdesc_t to match the RANK intrinsic. The first two solutions suggested are (1) fold the character length into elem_len (which, unless we add support for wchar_t, would be equal to the value of elem_len). (2) add an additional character length member. Both of these are favoured by those expressing an opinion in N1844. Bill Long gave clear reasons for option (1), so I have constructed edits for this. As far as I can see, the same edits would be needed for option (2), with the addition of edits for the additional member. These could always be added at a later date if they are deemed necessary. I am encouraged to think that this is the right solution by the fact that the edits involve the deletion of two paragraphs and the addition of a note that was in any case requested by Reinhold Bader in N1844. Note that if this is accepted, TR2 becomes mute. EDITS to N1838: [9:30] In 5.2.2 CFI_cdesc_t, para 1, line for size_t elem_len, replace "sizeof() of an element of the object" by "value of c_sizeof for an element of the Fortran object". [9:33] In 5.2.2 CFI_cdesc_t, para 1, line for CFI_rank_t rank, replace the first occurrence of "object" by "Fortran object". [10:9] In 5.2.2 CFI_cdesc_t, para 1, line for CFI_dim_t dim[], replace the first occurrence of "object" by "Fortran object". [10:10+] In 5.2.2 CFI_cdesc_t, at the end of the subclause, add NOTE 5.0 If the type of the Fortran object is default character, the value of the elem_len member shall be equal to the character length. A Fortran character array is permitted to interoperate with a multidimensional C array whose base type is a character array of size equal to the value of elem_len. For example, a Fortran array declared as CHARACTER (20) A(30,40) is interoperable with a C array declared as char b [40] [30] [20] [10:20-24] In 5.2.3 CFI_dim_t, delete para 2. [There is no longer anything exceptional about character type.] [16:9] In 5.2.7 Restrictions on the use of C descriptors, delete para 4.