
Roberto Bagnara writes:
Right. However, I believe here the point is another one: do GNU and Ciao Prolog require all foreign code they interoperate with to be compiled with -fomit-frame-pointer for proper operation? And: to interoperate with foreign code compiled without -fomit-frame-pointer, is it necessary to recompile GNU and Ciao Prolog without -fomit-frame-pointer?
For GNU Prolog, the experiments conducted by Daniele and myself would seem to indicate two positive answers. Should that be confirmed, it would constitute a serious drawback of GNU Prolog, since proper behavior should not depend on how foreign code is compiled, provided the calling conventions of the platform at hand are respected (and compiling with or without -fomit-frame-pointer has no influence, AFAICT, on the calling conventions used in the platforms we are talking about).
It is possible that omiting the frame pointer (whose exact effect on the assembler output I really do not know) somehow affects the proper behavior of {long,set}jump. Note that this behavior is anyway not documented in the GCC manual --- maybe this kind of conduct is part of the lore in the C compiler arena.
Yes, we have interfaced with libraries (most probably) compiled without -fomit-frame-pointer, but as far as I remember we did not have to raise exceptions.
MCL