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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b1208117d36fb121 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-08 10:34:08 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: presbeis@look.ca (FGD) Newsgroups: comp.lang.ada Subject: Re: System.Address'Size - not a static integer expression? Date: 8 Mar 2002 10:34:08 -0800 Organization: http://groups.google.com/ Message-ID: <7f1fa3aa.0203081034.12a7bd11@posting.google.com> References: <665e587a.0203060957.3682edf7@posting.google.com> <5ee5b646.0203061721.36d42541@posting.google.com> <3C877185.1CF93423@despammed.com> NNTP-Posting-Host: 209.148.72.53 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1015612448 2341 127.0.0.1 (8 Mar 2002 18:34:08 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 8 Mar 2002 18:34:08 GMT Xref: archiver1.google.com comp.lang.ada:20948 Date: 2002-03-08T18:34:08+00:00 List-Id: Wes Groleau wrote in message news:<3C877185.1CF93423@despammed.com>... > > > a.ads:12:33: static integer expression required here > > > > > > Is this a compiler bug? > > > > No, it is a correct diagnostic, this is not a static > > expression. > > Vadim, I had the same misunderstanding at one time, > so perhaps I can clarify: > > The 'Size attribute, even though "static" in nature > much of the time is officially defined as non-static > in the RM, and therefore not allowed where a "static" > value is required. > > In other words, compilers are required to pretend > that they don't know the value of 'Size at compile > time. Sometimes the value is known, sometimes not, > so it's simpler to pretend it's always unknown. I've wondered about this in the past, I can't remember any "official" justification for this. Why does the RM say it's not static? It requires static expression when defining it. Only unconstrained types can have non-static 'Size. (Am I missing something?) Maybe it's a language simplification, but a very inconvenient one... -- Frank