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,9a7e0c43216f4def X-Google-Attributes: gid103376,public From: dewar@gnat.com Subject: Re: "out" or "access" Date: 1998/10/31 Message-ID: <71dpa3$d76$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 406856645 References: <908956499.754394@dedale.pandemonium.fr> <70mo3h$gll$1@cf01.edf.fr> <71cjab$ka8$1@nnrp1.dejanews.com> X-Http-Proxy: 1.0 x2.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Sat Oct 31 01:31:46 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/2.02 (OS/2; I) Date: 1998-10-31T00:00:00+00:00 List-Id: In article , Robert A Duff wrote: > Matthew Heaney writes: > > > The RM also recommends that implementations "deliver a useful result" > > when you take the O'Address of a by-reference type (tagged types, > > limited types) passed as a subprogram parameter. That's why > > Sys.Addr_To_Acc_Conv can be used to work around this problem. > > I don't understand why you want to use 'Address at all. > My earlier suggestion was to use 'Unchecked_Access. > It has the same problem with possible dangling references, > but at least it doesn't throw type checking completely out > the window, as 'Address does. Note that Unchecked_Access still has restrictions which can be annoying, it cannot be applied to parameters for example, because it still requires the object to be aliased. In GNAT, the Unrestricted_Access attribute can be used anywhere 'Address is usable, and is comparable in effect, except that strong typing of the resulting pointer is retained. Robert Dewar Ada Core Technologies -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own