This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Function pointers to a nested function / contained procedure
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Thomas Koenig <tkoenig at netcologne dot de>
- Cc: gcc at gcc dot gnu dot org, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>
- Date: Tue, 26 Mar 2019 23:25:52 +0100
- Subject: Re: Function pointers to a nested function / contained procedure
- References: <1130b0c3-6955-7eb7-c31b-75324427e08c@netcologne.de>
> At the moment, I am at a loss of how to try to fix this. Any ideas?
> Is there any other language which has such a feature, so a bit of
> judicious copy & paste could be applied?
(GNU) C and Ada since the dawn of time. There is an entire machinery in the
middle-end and the back-ends to support this (look for trampolines/descriptors
in the manual and the source code). This should essentially work out of the
box for any language front-end.
--
Eric Botcazou