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/06/05 Message-ID: <7jb1l9$694$1@nnrp1.deja.com>#1/1 X-Deja-AN: 485981221 References: <928083159.436.79@news.remarQ.com> <928174549.336.98@news.remarQ.com> <7iuqkc$ln6$1@nnrp1.deja.com> <928529202.956.79@news.remarQ.com> <928569312.951.42@news.remarQ.com> X-Http-Proxy: 1.0 x40.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Sat Jun 05 11:28:43 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-06-05T00:00:00+00:00 List-Id: In article <928569312.951.42@news.remarQ.com>, "Vladimir Olensky" wrote: > > Vladimir Olensky wrote in message <928529202.956.79@news.remarQ.com>> <> Obviously you cannot require such a scheme, because of course it is inapplicable in many environments, especially with multi-threading. Even in environments where it might be practical, it's more expensive than you think, because some of these ranges are tasks specific data. In any case, this kind of approach is certainly completely familiar, and it would not be invalid for a compiler to implement it, but it seems a waste of time and space to me to attempt to guard against this kind of logic error in a language that does not even handle the uninitialized variable problem completely (and that too is of course quite a deliberate decision). It is certainly not something we would consider adding to GNAT in any environments. Generally the notion of erroneous in the RM is that you should detect it if it is free or cheap, but NOT add extra code for this kind of detection. Yes, it could be under some kind of debugging pragma, but if you are going to move in that direction, you want to go much further, and in particular handle the uninitialized variable problem, and other, much more common, and much more worrisome cases of erroneous access. Deallocation of static stuff is in fact a pretty easy error to guard against, since most typically this is done in well controlled finalization routines in any case, and it is just a matter of having the discipline to worry about this problem and take proper care of it when you write the finalization routine. And to repeat, since you keep repeating the subject, both GNAT and OA are right here, and do what the RM intends! Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.