To: J3 09-238r1 From: John Reid Subject: Inter-procedural transfers Date: 2009 August 11 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. EDITS [438:25-439:1] In 15.5.1 Definition and reference of interoperable procedures, para 5, replace the second sentence "If a procedure ..." by "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." [439:2+] In 15.5.1 Definition and reference of interoperable procedures, after para 5, add "NOTE 15.23a Examples of code that might cause a transfer of control that bypasses the normal return mechanism of a Fortran procedure are setjmp/longjmp in C and exception handling in other languages. No such behavior is permitted by this part of ISO/IEC 1539."