J3/02-196 Date: May 13, 2002 To: J3 From: Rob James/Interop Subject: Unresolved issue 366 This paper will correct some problems with the cross-references to the C standard in section 15 (as noted in unresolved issue 366), as well as some problems with Table 15.6. Edits: [381:7] Section 6.2.2 of the C standard describes linkage. "6.1.2.2" => "6.2.2" [382:9-] Delete J3 internal note. [383:18] Section 6.3.2.3 of the C standard describes conversions between pointer types. We should also refer to 6.5.9, where the equality operators are described. After "6.3.2.3", add "and 6.5.9". [385:0+] There are a few changes that need to be made in Table 15.6. In the last column of the table, the types "signed int", "signed short int", "signed long int", "signed long long int" are listed, but they are only defined in the C standard as alternate forms of the signed integer types "int", "short int", "long int", and "long long int", respectively. Since those types are already listed, we can remove their alternate forms from the table. Delete "signed int", "signed short int", "signed long int", and "signed long long int" from Table 15.6. [385:0+] There is no type "c_intmax_t" defined in the C standard. The correct type is "intmax_t". In Table 15.6, "c_intmax_t" => "intmax_t". [385:0+] The _Imaginary types are not defined in the normative text of the C standard, only in informative text (Annex G). Only the syntax is defined in the normative text. Since, conceivably, these types could have different linkage conventions than the regular floating point types, we should not specify that they are interoperable with Fortran real types. Delete "float _Imaginary", "double _Imaginary", and "long double _Imaginary" from Table 15.6. [385:0+] The type "_Complex" is not defined in the C standard. However, "float _Complex" is defined. We should change the reference to the "_Complex" type to "float _Complex". Also, we should be more consistent in the naming of the corresponding ISO_C_BINDING constant. This should be changed from "C_COMPLEX" to "C_FLOAT_COMPLEX". In the row in which "C_COMPLEX" appears in Table 15.6, "C_COMPLEX" => "C_FLOAT_COMPLEX" and "_Complex" => "float _Complex". [385:0+] The types in this table are not all defined in 6.2.5 of the C standard, as it says in the last row of Table 15.6. size_t is defined in 7.17, intmax_t is defined in 7.18.1.5, and the int_least*_t and int_fast*_t types are defined in 7.18.1. In the last row of Table 15.6, "clause 6.2.5." => "clauses 6.2.5, 7.17, and 7.18.1." [389:5] Some of the interoperable C types are defined in sections other than 6.2.5, as explained above. "6.2.5" => "6.2.5, 7.17, and 7.18.1" [392:13] Signal handlers are described in 7.14.1 of the C standard. "7.4.1.1" => "7.14.1"