From: "Nick Roberts" <nick.roberts@acm.org>
Subject: Re: Should be getting a constraint error in this code
Date: Sun, 25 Jul 2004 16:14:12 +0100
Date: 2004-07-25T16:14:12+01:00 [thread overview]
Message-ID: <opsbo8lyu6p4pfvb@bram-2> (raw)
In-Reply-To: 5281838.OJeT1fiqLc@linux1.krischik.com
On Sun, 25 Jul 2004 15:54:09 +0200, Martin Krischik
<krischik@users.sourceforge.net> wrote:
> Well observed!
Yes!
> But since he used a range and not a mod I would consider it a
> bug within the GNAT compiler.
I was surprised by GNAT's behaviour here, but I think we have to
stop short of calling it a bug for two reasons: (1) since
assigning an invalid value in the scope of pragma
Suppress(Range_Check), as is effectively the case here, is a
bounded error, GNAT's subsequent behaviour is entitled to be
wrong; (2) since the type was declared with a lower bound of 0,
it seems passable (if a bit weird) for T'Image to be implemented
using the same algorithm as for an unsigned byte.
--
Nick Roberts
next prev parent reply other threads:[~2004-07-25 15:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-24 2:32 Should be getting a constraint error in this code Keith Boruff
2004-07-24 3:33 ` Robert I. Eachus
2004-07-24 3:35 ` John B. Matthews
2004-07-24 15:08 ` Björn Persson
2004-07-25 13:54 ` Martin Krischik
2004-07-25 15:14 ` Nick Roberts [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-07-26 6:42 Christoph Karl Walter Grein
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox