From: Brian Drummond <brian@shapes.demon.co.uk>
Subject: Re: Compiler checking of String lengths during assignment (Newbie Question)
Date: Sat, 10 Jan 2015 12:43:55 +0000 (UTC)
Date: 2015-01-10T12:43:55+00:00 [thread overview]
Message-ID: <m8r6qb$teu$1@dont-email.me> (raw)
In-Reply-To: alpine.DEB.2.11.1501100017300.19658@debian
On Sat, 10 Jan 2015 00:20:11 +0100, Stefan.Lucks wrote:
> On Fri, 9 Jan 2015, Simon Wright wrote:
>
>>> The first 2 cases produces an error during the build, as expected,
>>> because Head is known to be length of 5 and I'm assigning something of
>>> a different length.
>
> I believe, all three should generate a run-time error (most likely a
> Constraint_Error).
The FSF Gnat 4.9.1 (Debian package) compiles with warnings, and all three
raise Constraint Error.
The first one reports "length check failed",
the other two "range check failed".
We often hear that the FSF compiler "lags behind" the Libre one and maybe
in some respects it does, but apparently, that doesn't mean it's always
worse.
- Brian
next prev parent reply other threads:[~2015-01-10 12:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-09 22:50 Compiler checking of String lengths during assignment (Newbie Question) isaac1.0
2015-01-09 23:10 ` Simon Wright
2015-01-09 23:20 ` Stefan.Lucks
2015-01-10 12:43 ` Brian Drummond [this message]
2015-01-09 23:53 ` Shark8
2015-01-10 0:18 ` Jeffrey Carter
2015-01-10 1:48 ` Adam Beneschan
2015-01-10 10:03 ` Pascal Obry
2015-01-10 10:54 ` Simon Wright
2015-01-15 20:44 ` isaac1.0
2015-01-15 21:18 ` Simon Wright
2015-01-15 22:30 ` Jeffrey Carter
2015-01-15 22:32 ` Jeffrey Carter
2015-01-16 7:28 ` Simon Wright
2015-01-16 15:44 ` Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox