From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,e55912fa8f040ab5 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!cleanfeed1-b.proxad.net!nnrp1-2.free.fr!not-for-mail Date: Sat, 10 Oct 2009 08:33:10 +0200 From: Damien Carbonne User-Agent: Thunderbird 2.0.0.23 (X11/20090812) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: GNAT GPL 2009 - issue with floating points? References: <4acf9ee2$0$23472$426a34cc@news.free.fr> <6d8f169d-5dc8-465c-9368-be91efc2de0f@v15g2000prn.googlegroups.com> <4acfb607$0$412$426a34cc@news.free.fr> <1d918375-9081-4e90-8abb-136f8e273622@z24g2000yqb.googlegroups.com> In-Reply-To: <1d918375-9081-4e90-8abb-136f8e273622@z24g2000yqb.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <4ad02aa6$0$22558$426a74cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 10 Oct 2009 08:33:10 MEST NNTP-Posting-Host: 82.247.219.63 X-Trace: 1255156390 news-3.free.fr 22558 82.247.219.63:40905 X-Complaints-To: abuse@proxad.net Xref: g2news2.google.com comp.lang.ada:8647 Date: 2009-10-10T08:33:10+02:00 List-Id: Ludovic Brenta a �crit : > Damien Carbonne wrote on comp.lang.ada: >> Adam Beneschan a �crit : >>> On Oct 9, 1:36 pm, Damien Carbonne 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. Thanks for clarification. Damien