From: Simon Wright <simon@pushface.org>
Subject: Re: Implementing Rust's borrow checked pointers
Date: Wed, 25 Sep 2019 16:04:50 +0100
Date: 2019-09-25T16:04:50+01:00 [thread overview]
Message-ID: <lyftkk76y5.fsf@pushface.org> (raw)
In-Reply-To: qmeqsh$15p$1@dont-email.me
"J-P. Rosen" <rosen@adalog.fr> 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
next prev parent reply other threads:[~2019-09-25 15:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-24 9:05 Implementing Rust's borrow checked pointers Lucretia
2019-09-24 9:57 ` Dmitry A. Kazakov
2019-09-24 11:23 ` Optikos
2019-09-24 12:02 ` Lucretia
2019-09-24 14:08 ` Optikos
2019-09-24 18:56 ` Simon Wright
2019-09-24 19:13 ` Keith Thompson
2019-09-24 20:15 ` Optikos
2019-09-24 20:31 ` Keith Thompson
2019-09-24 20:40 ` Optikos
2019-09-24 20:53 ` Keith Thompson
2019-09-24 22:09 ` Lucretia
2019-09-24 22:24 ` Keith Thompson
2019-09-25 4:36 ` J-P. Rosen
2019-09-25 15:04 ` Simon Wright [this message]
2019-09-24 12:23 ` Lucretia
2019-09-25 17:21 ` Stephen Leake
2019-09-24 16:24 ` Jeffrey R. Carter
2019-09-25 16:26 ` Florian Weimer
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox