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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,74b55538385b7366 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Which is right here - GNAT or OA ? Date: 1999/05/30 Message-ID: <7is6pt$8cd$1@nnrp1.deja.com>#1/1 X-Deja-AN: 483833435 References: <928083159.436.79@news.remarQ.com> X-Http-Proxy: 1.0 x24.deja.com:80 (Squid/1.1.22) for client 166.72.81.91 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Sun May 30 20:24:30 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-05-30T00:00:00+00:00 List-Id: In article <928083159.436.79@news.remarQ.com>, "Vladimir Olensky" wrote: This is definitely an RTFM case. The RM says 16 Evaluating a name that denotes a nonexistent object is erroneous. The execution of a call to an instance of Unchecked_Deallocation is erroneous if the object was created other than by an allocator for an access type whose pool is Name'Storage_Pool. So this programs is erroneous, and given that, OA and GNAT behave identically, namely they give unpredictable results. No other definition would make sense in the language, you don't want lots of elaborate checks going for an "unchecked" feature! Note that you have to be careful in the ase of controlled objects not to try to free statically allocated stuff. This is a user responsibility in writing the Finalize routine! Various tools will detect an attempt to free something that has never been allocated. For example the gnatmem tool supplied with GNAT will immediately detect that your program here is wrong. Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.