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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.w9ccYhHqE4Q004/5heo3Ew.user.gioia.aioe.org!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Implementing Rust's borrow checked pointers Date: Wed, 25 Sep 2019 16:04:50 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <5edf39fb-169a-463a-b28e-ece1d3b553e0@googlegroups.com> <1bf5a548-4d06-4a95-87f6-1e1170b04c99@googlegroups.com> NNTP-Posting-Host: w9ccYhHqE4Q004/5heo3Ew.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin) X-Notice: Filtered by postfilter v. 0.9.2 Cancel-Lock: sha1:3JLS4cgarKrqANblENhoLKXg+zA= Xref: reader01.eternal-september.org comp.lang.ada:57193 Date: 2019-09-25T16:04:50+01:00 List-Id: "J-P. Rosen" writes: > Le 25/09/2019 à 00:09, Lucretia a écrit : >>> Can you provide a specific citation? >> No, I'm fairly sure I saw it in one of the AARM's under compilation >> requirements years ago, but I cannot find it now. >> > You may be confused by 4.9(34/3): > "The expression is illegal if its evaluation fails a language-defined > check other than Overflow_Check. For the purposes of this evaluation, > the assertion policy is assumed to be Check." > > This means that it is an error if a static expression (evaluated at > compile-time) would raise an exception. As in 1. package Compile_Time is 2. 3. Bad : constant Integer := Integer'Last * 2; | >>> value not in range of type "Standard.Integer" >>> static expression fails Constraint_Check 4. 5. end Compile_Time; 5 lines: 2 errors gnatmake: "compile_time.ads" compilation error