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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,32cfbb718858528b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-08 08:51:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!out.nntp.be!propagator2-SanJose!propagator-SanJose!in.nntp.be!newsfeed0.news.atl.earthlink.net!news.atl.earthlink.net!news.mindspring.net!not-for-mail From: Richard Riehle Newsgroups: comp.lang.ada Subject: Re: Commercial C To Ada 95 compiler Date: Sat, 08 Jun 2002 08:53:28 -0700 Organization: AdaWorks Software Engineering Message-ID: <3D022877.B3B5CD3A@adaworks.com> References: <3D002D11.CC706952@adaworks.com> <4519e058.0206071148.9b87acf@posting.google.com> <3D0116F3.7254E263@despammed.com> <3D018106.6080004@worldnet.att.net> Reply-To: richard@adaworks.com NNTP-Posting-Host: 41.b2.40.0a Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 8 Jun 2002 15:54:05 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:25541 Date: 2002-06-08T15:54:05+00:00 List-Id: Jim Rogers wrote: > One simple example is indexing past the end of an array. > C compilers simply will not catch this problem. Ada compilers will. Actually, note that the following program that indexes off the end of an array will compile in Ada. procedure Index_Past_The_End is type Vector is array(Positive range <>) of Integer; The_Vector : Vector (1..100) := (others => 0); begin for I in The_Vector'First .. The_Vector'Last + 1 loop null; end loop; end Index_Past_The_End; Richard Riehle