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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2a34b7ad6c6a0774 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.mixmin.net!aioe.org!not-for-mail From: =?iso-8859-15?Q?Yannick_Duch=EAne_=28Hibou57=29?= Newsgroups: comp.lang.ada Subject: Re: Efficiency of code generated by Ada compilers Date: Tue, 10 Aug 2010 16:27:58 +0200 Organization: Ada At Home Message-ID: References: <1jmwhfp.roo31ybayx2bN%csampson@inetworld.net> <049ff595-3a53-48f3-8001-0d5cf1db0d2a@l6g2000yqb.googlegroups.com> <76de1822-f4cf-423a-8260-4b1cfac94172@f6g2000yqa.googlegroups.com> NNTP-Posting-Host: anOtUalzMUZHasssFqT+2w.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.60 (Win32) X-Original-Bytes: 3015 Xref: g2news1.google.com comp.lang.ada:13066 Date: 2010-08-10T16:27:58+02:00 List-Id: Le Tue, 10 Aug 2010 16:03:13 +0200, Elias Salom=E3o Helou Neto = a =E9crit: > It is a pity that this post became a technical discussion on array > indexing. Could I, if you please, talk to Phil without your prior acknowledgment = please ? ;) While I understand why you reacted (not the way you do... closed = parenthesis) > A simple question that could be asked in a single line is: > can Ada access arrays without range checking? Sorry, due to a recent trouble with my news reader, I've the original po= st. However, on this sentence basis, I would say: if you do not want range = check, then just disable it in the compiler option. But be warned you wi= ll = then be unable to catch runtime error. While there is a way to safely dr= op = this compiler option: validation with SPARK checker (just tell if you ne= ed = to learn about it). If your matter is just about range checking, the answer is as simple as = = that. If you use GNAT, you may insert "-gnatp" in the command line arguments. http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gnat_ugn_unw/Run_002dTime-Checks= .html If you use GNAT from the GPS environment, you may open the "Project" men= u, = then the "Edit project properties" submenu. Then choose the "Switches" = tab, then the "Ada" tab and check the "Suppress all check" check box or = = uncheck the "Overflow check" check box. Providing I did not fail to understand what you meant. -- = There is even better than a pragma Assert: a SPARK --# check. --# check C and WhoKnowWhat and YouKnowWho; --# assert Ada; -- i.e. forget about previous premises which leads to conclusion -- and start with new conclusion as premise.