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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b78c363353551702 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.219.170 with SMTP id pp10mr994847pbc.1.1340312151605; Thu, 21 Jun 2012 13:55:51 -0700 (PDT) Path: l9ni4463pbj.0!nntp.google.com!news2.google.com!news.glorb.com!news.netfront.net!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: about the new Ada 2012 pre/post conditions Date: Thu, 21 Jun 2012 13:55:48 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <4f0d55a9-83e1-44fe-8943-0c73a34a594d@googlegroups.com> NNTP-Posting-Host: 184.20.201.198 Mime-Version: 1.0 X-Trace: adenine.netfront.net 1340312151 7376 184.20.201.198 (21 Jun 2012 20:55:51 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Thu, 21 Jun 2012 20:55:51 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-06-21T13:55:48-07:00 List-Id: On 06/21/2012 01:37 PM, Randy Brukardt wrote: > > "Hard-coded checks" prevent the compiler from doing call-site optimizations > and tools from doing much of anything. They should be avoided. The solution > is the pragma I showed earlier: > > pragma Assertion_Policy (Pre => Check, > Pre'Class => Check, > Static_Predicate => Check, > Dynamic_Predicate => Check); > > put in *every* reusable package spec. They still can suppress the checks by > manually deleting the pragma, but it will render command line switches and > IDE checkboxes ineffective. And if they do delete the pragma, they've > intentionally shot themselves in the foot, and it is no longer your (the > package maintainers) problem. (Unless of course they want to spend extra > $$$.) Interesting. I wasn't aware of checks that can't be overridden by compiler options, and will be surprised if most compilers don't include a way to override these as well. -- Jeff Carter "Death awaits you all, with nasty, big, pointy teeth!" Monty Python & the Holy Grail 20 --- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---