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-30 06:19:52 PST Newsgroups: comp.lang.ada Path: swrinde!cs.utexas.edu!uunet!world!bobduff From: bobduff@world.std.com (Robert A Duff) Subject: Re: Memory overwrite? Message-ID: Organization: The World Public Access UNIX, Brookline, MA References: <3g86nm$mj3@miranda.gmrc.gecm.com> <3gehlo$i05@gnat.cs.nyu.edu> Date: Mon, 30 Jan 1995 14:16:05 GMT Date: 1995-01-30T14:16:05+00:00 List-Id: In article <3gehlo$i05@gnat.cs.nyu.edu>, Robert Dewar wrote: >But just the fact that you are using two different I's does not seem >to warrant a warning to me! This mistake is so common, I think it deserves a warning. You've got nothing better to do, right? ;-) If you have a variable that is never initialized (whether it's used or not), and an inner for loop index of the same name, that's when I would give a warning about not needing to declare the for loop index. Of course, a variable never initialized (or used) might deserve a warning anyway, but if you just say "variable I never used", you will confuse someone who thought you needed to declare I outside the for loop. To me, it seems friendy to give a more specific message in the for-loop case. - Bob