To: J3 09-238r2 From: John Reid Subject: Inter-procedural transfers Date: 2009 August 12 References: 09-238, 09-007r2 In 09-238, Nick Maclaren points out that if a C++ procedure is called (directly or indirectly) from Fortran, it might bypass the return mechanism of an executing Fortran procedure by using throw/catch. He suggested adding a note to discourage this. HPC prefers to add the general rule to normative text and mention exception handling in a note. Draft 09-007r2:[439:20-21] says: "A procedure defined by means other than Fortran shall not alter the floating-point status (14.7) other than by setting an exception flag to signaling.". Therefore, we do not feel the changes suggested in the second part of 09-238 are needed. EDITS [312:14+] In 12.6.3 Definition and invocation of procedures by means other than Fortran, after para 1 add a new paragraph and Note: "A procedure that is defined by means other than Fortran and is invoked during the execution of a Fortran procedure shall not cause a transfer of control to an executing Fortran procedure instance other than by returning to its caller. NOTE 12.47a Examples of code that might cause a transfer of control that bypasses the normal return mechanism of a Fortran procedure are setjmp and longjmp in C and exception handling in other languages. No such behavior is permitted by this part of ISO/IEC 1539."