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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no 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!news3.google.com!proxad.net!feeder1-2.proxad.net!u-picardie.fr!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Efficiency of code generated by Ada compilers Date: Wed, 11 Aug 2010 18:49:45 -0500 Organization: Jacob Sparre Andersen Message-ID: References: <8cf0fkF60rU1@mid.individual.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1281570588 6375 69.95.181.76 (11 Aug 2010 23:49:48 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 11 Aug 2010 23:49:48 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-RFC2646: Format=Flowed; Original Xref: g2news1.google.com comp.lang.ada:13149 Date: 2010-08-11T18:49:45-05:00 List-Id: "Robert A Duff" wrote in message news:wcczkwtnvhb.fsf@shell01.TheWorld.com... > Niklas Holsti writes: > >> Yannick Duch�ne (Hibou57) wrote: >>> This is no more valid Ada (well.... this is still valid Ada 95, this >>> is just not more valid Ada 2005/2012) >> >> In the Ada 2005 RM, see section J.10 (Obsolescent Features: Specific >> Suppression of Checks). > > Right. And things in the "Obsolescent Features" annex are perfectly > good Ada, and all Ada compilers are required to support them. > These features are "obsolescing" so slowly that they will never > actually become "obsolete". ;-) Somewhat irrelevant in this case, because there is no definition or agreement as to what it means to suppress checks on a particular type or object. One possibility is to do nothing at all (a compiler is never *required* to suppress checks). So while this probably will work on most compilers, there is no guarantee that it will work the same way. To make a more concrete example: A : Integer : = -1; B : Natural := 0; pragma Suppress (Range_Check, On => B); B := A; -- ?? The language does not say what object or type needs to be suppressed in order to suppress the range check on this assignment. It might require the check to be suppressed on A or on B or on both or on the subtype Natural or on something else. So this feature is best avoided. (Note that this is as true for Ada 83 and Ada 95 as it is for Ada 2005.) Randy.