ISO/IEC JTC1/SC22/WG5 N1918 Changes to N1911 to create N1917 Bill Long, 8-May 2012 WG5 document N1911 was a candidate DTS for TS 29113, Further Interoperability of Fortran with C. An informal WG5 Ballot, N1914, resulted in comments documented in N1916. Those Ballot comments and additional comments resulting from email discussions on the interop-tr email list and the WG5 email list resulted in comments included in this document. The accumulation of these changes applied to N1911 resulted in an updated DTS candidate document WG5/N1917. Edit citations refer to N1911. Comments include the name of the commenter and source of the comment. The commenters are: Bill: Bill Long, Cray Inc. (USA) (TS editor) Malcolm: Malcolm Cohen, NAG (UK) (Fortran standard editor) Robert: Robert Corbett, Oracle (USA) Nick: Nick Maclaren, Cambridge (UK) David: David Muxworthy, Edinburgh (UK) (BSI) Some comments include explanatory text enclosed in { }. ------------------------------------------------------------ 1) Replace para 3 in 8.3.1 (Robert Ballot comment 1, Nick email.} N1911 text: "A C source file that includes the ISO_Fortran_binding.h header file shall not use any names starting with CFI_ that are not defined in the header. All names defined in the header begin with CFI_ or an underscore character, or are defined by a standard C header that it includes." Replacement text: "A C source file that includes the ISO_Fortran_binding.h header file shall not use any names starting with CFI_ that are not defined in the header, and shall not define any of the structure names defined in the header as macro names. All names other than structure member names defined in the header begin with CFI_ or an underscore character, or are defined by a standard C header that it includes." {Prevent hijacking of structure member names by use of macros.} -------------- 2) 8.3.4p1 modify second sentence (Robert Ballot comment 2, Bill editorial.) N1911 text: "Except for CFI_CDESC_T, each macro expands to an integer constant expression suitable for use in #if preprocessing directives." Replacement text: "Except for CFI_CDESC_T, each macro expands to an integer constant expression that is either a single token or a parenthesized expression that is suitable for use in #if preprocessing directives." {Add boiler plate to ensure that object-like macros expand to either a single token or a parenthesized expression.} --------------- 3) 8.3.4p2, last part of the first sentence (Robert Ballot comment 3, Nick email comment.) N1911 text: "and evaluates to a type suitable for declaring a C descriptor of that rank." Replacement text: "and evaluates to an unqualified type of suitable size and alignment for defining a variable to use as a C descriptor of that rank." {Clarify what CFI_CDESC_T produces.} --------------- 4) Unfortunate page break between at the bottom of page 50. (David Ballot comment.) Removed a blank line in the example source code near the bottom of page 50. {Other page break issues are being deferred to the stage of integrating the TS into the base Fortran standard, where the page breaks will fall in different locations.} --------------- 5) Need to explain why we are referencing the C99 standard instead of the new C11 standard. (David email comment.) Add this Note at the end of the Introduction clause: "Note 0.1 ISO/IEC 1539-1:2010 references ISO/IEC 9899:1999. For consistency, this Technical Specification also references ISO/IEC 9899:1999, not ISO/IEC 9899:2011." {Placed in the Introduction clause because the ISO rules do not allow Notes in the Normative References clause. This topic started as a Ballot Comment from David suggesting that we change the reference to C11. Objections to this suggestion, partly based on the significant work that would be needed, led to the compromise here.} ============================ Ballot comments that did not result in changes: 6) The draft does not address the issue of an object that is be located in read-only memory by a C function, but might be subject to copy-out semantics at a call site in Fortran. (Robert Ballot comment 4, Nick email comment.) {This issue is acknowledged, but is actually a problem already present in the current base Fortran standard. Preferred way to address this is through an Interpretation request against the base standard.} ---------------- 7) 8.3.4p3, reword the description of CFI_index_t. {Robert Ballot comment 5.) {The current text more directly specifies the requirement for such a type, which is used to declare variables involved in computing offsets to be added to a pointer to get another pointer. The suggested change was not seen as an improvement.}