From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Formal Subprogram Access
Date: Tue, 13 Feb 2018 18:57:47 -0600
Date: 2018-02-13T18:57:47-06:00 [thread overview]
Message-ID: <p601ic$hqf$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: 1f226b44-eff5-4d54-bacf-07e2303f1b50@googlegroups.com
"AdaMagica" <christ-usch.grein@t-online.de> wrote in message
news:1f226b44-eff5-4d54-bacf-07e2303f1b50@googlegroups.com...
> So taking everything together, and as a generic body assumes the worst,
> 'Access should be forbidden for generic subprogram parameters.
>
> I cannot find such a rule in the RM. Looks like an oversight?
I doubt that we could change this at this late date (20+ years) even if it
was an original mistake.
> Is this worth a note in Ada Comment?
Up to you.
> As Randy said, generic parameter subprograms should be wrapped in a local
> subprogram for 'Access - or do I misinterprete him?
No, I said that the *compiler* has to wrap generic actual subprograms. (For
Janus/Ada, we have to do that for all subprograms, because of generic
sharing and the possibility that the parameters change subtypes, or have a
deeper level, or many other things. So this is a non-problem for Janus/Ada
in any case.) So far as I can tell, they have to have an Ada convention, so
they have the be wrapped if the convention is anything else [and that
matters].
Note that the same issue comes up when passing predefined operators
(probably a more realistic case).
Randy.
next prev parent reply other threads:[~2018-02-14 0:57 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-09 22:11 Formal Subprogram Access Jeffrey R. Carter
2018-02-10 3:03 ` Randy Brukardt
2018-02-10 9:57 ` Jeffrey R. Carter
2018-02-13 5:51 ` Randy Brukardt
2018-02-13 9:24 ` AdaMagica
2018-02-13 9:41 ` Dmitry A. Kazakov
2018-02-13 10:28 ` AdaMagica
2018-02-14 0:47 ` Randy Brukardt
2018-02-14 8:19 ` Dmitry A. Kazakov
2018-02-14 10:01 ` Jacob Sparre Andersen
2018-02-14 11:07 ` Dmitry A. Kazakov
2018-02-13 12:24 ` Simon Wright
2018-02-14 0:53 ` Randy Brukardt
2018-02-14 14:36 ` Simon Wright
2018-02-15 4:56 ` Randy Brukardt
2018-02-15 13:12 ` Simon Clubley
2018-02-15 16:38 ` Simon Wright
2018-02-15 18:40 ` Simon Clubley
2018-02-15 16:19 ` Simon Wright
2018-02-15 23:03 ` Randy Brukardt
2018-02-13 17:34 ` Jeffrey R. Carter
2018-02-13 18:31 ` AdaMagica
2018-02-14 0:57 ` Randy Brukardt [this message]
2018-02-10 14:55 ` AdaMagica
2018-02-21 17:51 ` Jeffrey R. Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox