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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c840deaa6965e67a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-28 16:02:04 PST Path: swrinde!gatech!newsxfer.itd.umich.edu!zip.eecs.umich.edu!panix!cmcl2!thecourier.cims.nyu.edu!thecourier.cims.nyu.edu!nobody From: dewar@cs.nyu.edu (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Memory overwrite? Date: 28 Jan 1995 17:49:28 -0500 Organization: Courant Institute of Mathematical Sciences Message-ID: <3gehlo$i05@gnat.cs.nyu.edu> References: <3g86nm$mj3@miranda.gmrc.gecm.com> NNTP-Posting-Host: gnat.cs.nyu.edu Date: 1995-01-28T17:49:28-05:00 List-Id: Bob Duff says: >procedure CRASH is > subtype CONSTRAINED_INT is INTEGER range 2 .. 5; > I : INTEGER; > J : CONSTRAINED_INT; > X : array(CONSTRAINED_INT) of INTEGER; >begin > for I in CONSTRAINED_INT'RANGE loop GNAT also ought to warn that this I is different from the one declared above, since the for loop automatically declares a new I! ;-) Robert asks Bob: do you *really* want a warning here? I could see a warning saying that the outer I is unreferenced if it was (but in fact it was referenced), or that it was uninitialized (which it was, and in fact I think we should have been able to give the usual warning for this, I didn't check, because I don't have the whole original post). But just the fact that you are using two different I's does not seem to warrant a warning to me! Bob, what exactly did you have in mind?