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,528b3cda1ec091b6 X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Generic Actual Tagged Objects Not Implicitly Aliased? Date: 1998/04/29 Message-ID: #1/1 X-Deja-AN: 348765081 Sender: news@inmet.camb.inmet.com (USENET news) References: X-Nntp-Posting-Host: houdini.camb.inmet.com Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1998-04-29T00:00:00+00:00 List-Id: Matthew Heaney (matthew_heaney@acm.org) wrote: : Suppose we have the following tagged type: : type T is tagged limited ...; : ... : Now, suppose I have a generic declaration : generic : O : in out T; : package GP is ...; : package body GP is : .... O'Access ... : package Objects is : O : T; : end; : with Objects; : package P is new GP (O); : My compiler (GNAT 3.10p) is telling me that that instantiation of P is : illegal, becuase O is not declared as aliased. This sounds like a bug in GNAT. : ... : This behavior begs certain questions: : 1) Why can't you take the 'Access of generic formal object of a tagged : type, without the actual object being declared as aliased? This would make : the behavior consistant with that for subprogram parameters. You can. Don't confuse bugs in an implementation with bugs in the language definition ;-). : ... : Thanks, : Matt -- -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Burlington, MA USA