J3/03-170 Date: 31-mar-2003 To: J3 From: Donev Subject: Edits for UK Comment MCT14 Reference: This paper is a revision of the "Comment MTC14 of the UK" part of J3/03-128. Edits refer to 02-007R3. ------------------------ Comment MCT14 raised 6 issues regarding C interoperability. Issue (1) was later determined by UK to not need an edit, and none is supplied in 03-128. Issue (3) regarding I/O on files from both C and Fortran is addressed in a different way in [180:1-5] and [470:28-29]. Interop believes that the current text on this topic is preferred to the proposed edits in 03-128. Issue (4) proposes to prohibit a C procedure from closing a file currently connected to a Fortran unit. This would be in conflict with the requirements on the C exit() procedure [15:25] and has other problems. Interop believes that the edit associated with issue (4) should not be made. Issues (2), (5), and (6) are addressed below. The interaction of C interoperability and exception handling needs to be more explicitly addressed in the standard. This is currently mentioned only in Note 14.7 on page 360. This paper replaces part of Note 14.7 with more specific normative text. Edits: Delete from [360:3+] in Note 14.7: "No such requirements can be placed on procedures defined by means other than Fortran. For such procedures, it is the responsibility of the user to ensure that the floating point status is preserved" [393:0+] After Note 15.25, add: <<15.4.2 Exceptions and IEEE arithmetic procedures>> A procedure defined by means other than Fortran shall not use signal (C standard, 7.14.1) to change the handling of any exception that occurs in a Fortran procedure and is being handled by the Fortran processor. A procedure defined by means other than Fortran shall not alter the floating point status (14.5) other than by setting an exception flag to signaling. The values of the floating point exception flags on entry to a procedure defined by means other than Fortran are processor-dependent.