comp.lang.ada
 help / color / mirror / Atom feed
From: Serge Robyns <serge.robyns@gmail.com>
Subject: Re: Bounded String question
Date: Thu, 12 Nov 2015 09:31:16 -0800 (PST)
Date: 2015-11-12T09:31:16-08:00	[thread overview]
Message-ID: <2573827f-78e1-4554-a57e-11d3cb977c44@googlegroups.com> (raw)
In-Reply-To: <1a532527-f48c-4646-abb5-ec64b5e6106b@googlegroups.com>

On Wednesday, 11 November 2015 21:40:35 UTC+1, AdaMagica  wrote:

> No complaint from GNAT GPL 2015:
> --------------------------------
> 

> gprbuild -ws -c -f -u -PC:\Users\Grein\Documents\Christoph\Ada\Spielplatz\spielplatz.gpr -XGeneration=Ada_2012 bs_test.adb
> gcc -c -gnato -g -fstack-check -gnata -gnatf -gnat12 bs_test.adb
> [2015-11-11 21:37:27] process terminated successfully, elapsed time: 02.07s

I'm baffled.  I copied you code and indeed.  I added Put_Line just to make sure there is something in the body and to see the output :-P.

When applying this again on my package I get my previous errors.  I tried to moved up my private declarations of the constants into the visible part, no relieve.  I moved the constant declaration right after the type declaration no solution neither.  The error message is very clear and I can't disagree with them:
: non-static constant in preelaborated unit
: static expression must have scalar or string type (RM 4.9(2))

I've noticed that error messages can change because of other errors.  I had that on certain occasions.  Maybe, as in some other cases, the compiler just missed to moan in your example but do actually fail with respect to the standards.

  reply	other threads:[~2015-11-12 17:31 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 22:00 Bounded String question Serge Robyns
2015-11-11  0:48 ` Bob Duff
2015-11-11  2:01   ` Jeffrey R. Carter
2015-11-11 15:34     ` Bob Duff
2015-11-11 17:36       ` Jeffrey R. Carter
2015-11-11 19:22         ` Bob Duff
2016-03-06 18:59       ` Xavier Petit
2016-03-07 23:16         ` Randy Brukardt
2016-03-08  0:08           ` Jeffrey R. Carter
2016-03-09  1:18             ` Randy Brukardt
2015-11-11 10:52   ` Serge Robyns
2015-11-11 13:43     ` Serge Robyns
2015-11-11 14:32       ` brbarkstrom
2015-11-11 16:08         ` Serge Robyns
2015-11-11 17:27       ` Jeffrey R. Carter
2015-11-11 20:06         ` Serge Robyns
2015-11-11 20:23           ` AdaMagica
2015-11-11 20:27             ` AdaMagica
2015-11-11 20:32             ` Serge Robyns
2015-11-11 20:40               ` AdaMagica
2015-11-12 17:31                 ` Serge Robyns [this message]
2015-11-12 19:10                   ` AdaMagica
2015-11-12 21:29                     ` Randy Brukardt
2015-11-12 18:03                 ` G.B.
2015-11-12 18:13                   ` Serge Robyns
2015-11-12 18:14                     ` Serge Robyns
2015-11-12 19:37                   ` Randy Brukardt
2015-11-11 20:42           ` Jeffrey R. Carter
2015-11-12 16:59             ` Serge Robyns
2015-11-12 18:39               ` Jeffrey R. Carter
2015-11-12 21:19                 ` Randy Brukardt
2015-11-12 21:27               ` Randy Brukardt
2015-11-12 22:32                 ` Jeffrey R. Carter
2015-11-13  0:07                   ` Randy Brukardt
2015-11-13  1:01                     ` Jeffrey R. Carter
2015-11-11 15:41     ` Bob Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox