comp.lang.ada
 help / color / mirror / Atom feed
From: mr101@ccsr.cam.ac.uk (Michael Roe)
Subject: Annex E.4, clause 18
Date: 1999/01/29
Date: 1999-01-29T00:00:00+00:00	[thread overview]
Message-ID: <78sipr$je1$1@pegasus.csx.cam.ac.uk> (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




                 reply	other threads:[~1999-01-29  0:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox