From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: GNAT GPL 2009 - issue with floating points?
Date: Fri, 9 Oct 2009 15:44:23 -0700 (PDT)
Date: 2009-10-09T15:44:23-07:00 [thread overview]
Message-ID: <1d918375-9081-4e90-8abb-136f8e273622@z24g2000yqb.googlegroups.com> (raw)
In-Reply-To: 4acfb607$0$412$426a34cc@news.free.fr
Damien Carbonne wrote on comp.lang.ada:
> Adam Beneschan a écrit :
> > On Oct 9, 1:36 pm, Damien Carbonne <damien.carbo...@free.fr> wrote:
> >> Hi,
>
> >> When compiling the following sample code with GNAT GPL 2009 on Linux:
>
> >> generic
> >> type Real is digits <>;
> >> package Pack04 is
> >> Size1 : constant := Real'Size;
> >> Size2 : constant Integer := Real'Size;
> >> end Pack04;
>
> >> I get this:
>
> >> -- pack04.ads:4:24: non-static expression used in number declaration
> >> -- pack04.ads:4:28: size attribute is only static for scalar type (RM
> >> 4.9(7,8))
> Do you mean that the formal generic parameter Real is not a scalar?
> I'm certainly no an Ada expert, but I really find the message confusing.
Real is scalar all right but it is not static; the first error message
is explicit about that. I agree that the second message is confusing;
it should read "size attribute is only static for a static scalar
subtype (RM 4.9(7,8,26))". Generic formal subtypes are non-static.
HTH
--
Ludovic Brenta.
next prev parent reply other threads:[~2009-10-09 22:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-09 20:36 GNAT GPL 2009 - issue with floating points? Damien Carbonne
2009-10-09 21:06 ` Adam Beneschan
2009-10-09 22:15 ` Damien Carbonne
2009-10-09 22:44 ` Ludovic Brenta [this message]
2009-10-10 6:33 ` Damien Carbonne
2009-10-10 14:55 ` Samuel Tardieu
2009-10-10 16:12 ` Ludovic Brenta
2009-10-10 16:38 ` Damien Carbonne
2009-10-09 23:26 ` Adam Beneschan
2009-10-10 6:39 ` Damien Carbonne
2009-10-10 7:16 ` Dmitry A. Kazakov
2009-10-11 9:33 ` Dirk Herrmann
2009-10-11 10:27 ` Dmitry A. Kazakov
2009-10-12 23:26 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox