Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[spec] Make note of setjmp issue #41

Open
marcgamell opened this issue May 26, 2017 · 1 comment
Open

[spec] Make note of setjmp issue #41

marcgamell opened this issue May 26, 2017 · 1 comment

Comments

@marcgamell
Copy link
Contributor

As an advice to users, note that there may be compiler optimizations disabled due to the use of Fenix_Init. Maybe place the bulk of user's computation in a different, non-inlined function?

@nathanweeks
Copy link

Hi @marcgamell , it seems the use of setjmp/longjmp in Fenix also precludes its use by Fortran programs per the Fortran 2008 (draft) standard:

12.6.3 Definition and invocation of procedures by means other than Fortran
...
2. A procedure defined by means other than Fortran that is invoked by a Fortran procedure and does not cause termination of execution shall return to its caller.
NOTE 12.45

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants