* Annex E.4, clause 18
@ 1999-01-29 0:00 Michael Roe
0 siblings, 0 replies; only message in thread
From: Michael Roe @ 1999-01-29 0:00 UTC (permalink / raw)
Ok, so I've been bitten by this one too!
The LRM says:
"In a remote subprogram call with a formal parameter of a class-wide type,
a check is made that the tag of the actual parameter identifies a tagged
type declared in a declared-pure or shared passive library unit, or in
the visible part of a remote types or remote call interface library unit.
Program_Error is raised if this check fails."
GNAT 3.11p enforces this check, although earlier versions of GNAT didn't.
This *isn't* a bug in GNAT - the check is clearly required by the LRM.
Unfortunately, enforcing this check breaks a very large number of existing
(incorrect) programs. For example, the Aegis simulation provided as a demo
with Adept violates this. (And quite a few of my programs do too...)
The trouble is, the typical use of RACW types to implement callbacks is
prohibited by this check. Getting aroud the check often involves a radical
restructuring of the entire program, separating packages into two parts so
that the part that declares a RACW type can be declared Remote_Types.
I understand what the LRM *says* - I'm just not sure why it says it!
Particularly as earlier versions of GNAT/GLADE worked without enforcing
it. Do any of the readers of this newsgroup understand the rationale for
it? I can just about imagine why it's there, but I've so far failed to
come up with a coherent explanation of it!
Mike
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-01-29 0:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-29 0:00 Annex E.4, clause 18 Michael Roe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox