From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7fd93e3c8a8e5521,start X-Google-Attributes: gid103376,public From: mr101@ccsr.cam.ac.uk (Michael Roe) Subject: Annex E.4, clause 18 Date: 1999/01/29 Message-ID: <78sipr$je1$1@pegasus.csx.cam.ac.uk>#1/1 X-Deja-AN: 438354420 Sender: mr101@kamloops.ccsr.cam.ac.uk (Michael Roe) Organization: University of Cambridge, England Newsgroups: comp.lang.ada Date: 1999-01-29T00:00:00+00:00 List-Id: 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