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: f849b,b8d52151b7b306d2 X-Google-Attributes: gidf849b,public X-Google-Thread: 103376,a00006d3c4735d70 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-27 09:07:16 PST Message-ID: <3fedbc41_3@mk-nntp-1.news.uk.worldonline.com> From: Ian Bell Subject: Re: Certified C compilers for safety-critical embedded systems Newsgroups: comp.arch.embedded,comp.lang.ada Followup-To: comp.arch.embedded Date: Sat, 27 Dec 2003 17:10:04 +0000 References: <3fe00b82.90228601@News.CIS.DFN.DE> <3FE026A8.3CD6A3A@yahoo.com> <$km9afA3DB7$EAYO@phaedsys.demon.co.uk> <3feda44e_3@mk-nntp-1.news.uk.worldonline.com> Organization: REMAP User-Agent: KNode/0.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit NNTP-Posting-Host: ppp-225-3-100.friaco.access.uk.tiscali.com X-Trace: 27 Dec 2003 17:07:14 GMT, ppp-225-3-100.friaco.access.uk.tiscali.com Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!chcgil2-snh1.gtei.net!news.bbnplanet.com!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!kibo.news.demon.net!demon!mk-nntp-1.news.uk.worldonline.com!ppp-225-3-100.friaco.access.uk.tiscali.com Xref: archiver1.google.com comp.arch.embedded:6163 comp.lang.ada:3853 Date: 2003-12-27T17:10:04+00:00 List-Id: Georg Bauhaus wrote: > In comp.lang.ada Ian Bell wrote: > :James Rogers> foo : My_Array_Type; > :> > :> for num in 0..99 loop > :> foo(num) := num; > :> end loop; > :> > :> All Ada compilers will correctly identify the error in the for loop. > :> [...] > : > : I know nothing about ada so this is a genuine query rather than a > : ctiticism. The above example is fine as long as literals are used - even > : a C compiler could be devised to make this check - but what happens when > : the array index is computed? > > Wouldn't that become a famous compiler that finds out, at compile > time, which value a certain variable is going to have? :-) > Ah, so Ada is no better than C in that respect? Ian