comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Memory overwrite?
Date: 28 Jan 1995 17:49:28 -0500
Date: 1995-01-28T17:49:28-05:00	[thread overview]
Message-ID: <3gehlo$i05@gnat.cs.nyu.edu> (raw)
In-Reply-To: D32HMF.FM9@world.std.com

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?




  reply	other threads:[~1995-01-28 22:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-01-26 13:05 Memory overwrite? R.A.L Williams
1995-01-27 14:01 ` Robert A Duff
1995-01-28 22:49   ` Robert Dewar [this message]
1995-01-30 14:16     ` Robert A Duff
1995-02-01 23:00       ` Matt Kennel
1995-01-28  5:54 ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1995-01-24 12:47 R.A.L Williams
1995-01-25 16:31 ` Robert A Duff
1995-01-25 19:01 ` Tucker Taft
1995-01-25 21:24 ` Robert Dewar
1995-01-30 17:06 ` Theodore E. Dennison
1995-02-01 12:25   ` Robert Dewar
1995-01-13  8:35 Rick Wouters
     [not found] ` <3fe5cp$fnq@theopolis.orl.mmc.com>
1995-01-18 18:20   ` Mark A Biggar
1995-01-20  5:19     ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox