To: J3 11-173 From: Bill Long Subject: CFI_type_other split Date: 2011 June 07 Reference: WG5/N1854 Discussion: ----------- The collection of types in the current type code CFI_type_other bin includes some of substantially different nature. Also, the sign of CFI_type_other is confusing, as some types covered could suggest a positive value, while others clearly indicated negative. Splitting the collection would provide greater functionality. In particular, one of the presumed uses of the new interoperability facility is to provide interfaces to C routines that, in effect, copy blocks of data. Variables of types that represent only raw "data" are reasonable candidates for such copying, whereas types with components that have ALLOCATATBLE or POINTER attributes are not. Thus, it would be advantageous to have two catch-all bins: CFI_type_data and CFI_type_other. By putting Fortran intrinsic types for which there is no C counterpart (such as 128-bit real) into the CFI_type_data collection, future expansion of the type list should be less disruptive. The proposal is to split CFI_type_other into: CFI_type_data : Fortran intrinsic types that are not represented by other type codes and Fortran derived types that do not have type paremeters, type-bound procedures, final procesures, or components that are allocatable, pointer, or correspond to CFI_type_other. The value of CFI_type_data is nonnegative. CFI_type_other: Any other type. Its value is negative. Edits to N1854: -------------- [11:16-17] Replace the second sentence of 5.2.4 Macros para 7 with: "The value of CFI_type_data shall be nonnegative and distinct from all other type specifiers. The value of CFI_type_other shall be negative and distinct from all other type specifiers." [11:18+] Add a new paragraph following para 7 of 5.2.4 Macros: "The CFI_type_data type specifier is used for Fortran intrinsic types that are not represented by other type specifiers and Fortran derived types that do not have type paremeters, type-bound procedures, final procesures, or components that have the ALLOCATALE or POINTER attributes, or correspond to CFI_type_other." [12:Table 5.2] Immediately before the CFI_type_other entry in Table 5.2, add a new line: "CFI_type_data | General data type "