Marc Espie wrote:
In article <[EMAIL PROTECTED]> you write:
Well as I said above, trampolines or an equivalent are currently critically
needed by some front ends (and of course by anyone using the (very useful IMO)
extension of nested functions in C).
This is your opinion, but I've yet to find an actual piece of code in a
real project that uses that extension.
I have certainly seen it used, but you may well be right that it is
seldom used. It is certainly reasonable to consider removing this
extension from C and C++. Anyone using that feature? Or know anyone
who is.
On the other hand, non-executable stack is a feature used in the real
world. Quite in common use actually...
Think about that.
Well you only disable the execution of the stack if you use trampolines
you don't need to do it unconditionally. I agree that with C code, it is
desirable to protect the stack in this way, since it is so easy in C to
create code that has buffer overruns. This is much less true in Ada so
that's less of a consideration.
I think it would be reasonable to contemplate removing trampolines.
Never mind the stack protection issue, the fact is that cache management
has made trampolines horribly expensive on many new architectures.
So that would mean eliminating the extension from C, and redoing function
pointers in Ada (and Pascal, and Fortran??) to use a double pointer, which
would be far more efficient for many (but not all) programs.