From: AdaMagica <christ-usch.grein@t-online.de>
Subject: Re: GNAT bug with assertions
Date: Mon, 13 Aug 2018 02:03:42 -0700 (PDT)
Date: 2018-08-13T02:03:42-07:00 [thread overview]
Message-ID: <e9c02e55-50ac-41a8-adb0-030dbccc777c@googlegroups.com> (raw)
In-Reply-To: <ly7ekvo1tl.fsf@pushface.org>
Am Sonntag, 12. August 2018 20:51:51 UTC+2 schrieb Simon Wright:
> AdaMagica writes:
>
> > Thank you all for your time to think about this.
> >
> > I'll send it in to AdaCore. Hopefully it will be correted next year in
> > the public version.
>
> This is a somewhat artificial error, isn't it?
>
> function Maybe (X : Priv) return Subt;
> ...
> function Maybe (X : Priv) return Subt is (X);
> ...
> X := Maybe (C); -- C is -1
>
> works as we would have expected.
What is it that you expect here? What type is X? I didn't try with GNAT, but I would expect Maybe (C) to raise Assertion_Error independently of X.
next prev parent reply other threads:[~2018-08-13 9:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-10 10:29 GNAT bug with assertions AdaMagica
2018-08-10 14:23 ` Anh Vo
2018-08-10 15:16 ` Jacob Sparre Andersen
2018-08-10 16:16 ` Simon Wright
2018-08-10 20:42 ` Randy Brukardt
2018-08-12 18:35 ` AdaMagica
2018-08-12 18:51 ` Simon Wright
2018-08-13 9:03 ` AdaMagica [this message]
2018-08-13 9:07 ` Simon Wright
2018-08-13 15:54 ` Simon Wright
2018-08-13 16:55 ` Simon Wright
2018-08-14 2:37 ` AdaMagica
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox