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-04-07 21:57:19 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: System.Address'Size - not a static integer expression? Date: 7 Apr 2002 21:57:18 -0700 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0204072057.48d33742@posting.google.com> References: <665e587a.0203060957.3682edf7@posting.google.com> <5ee5b646.0203061721.36d42541@posting.google.com> <3C877185.1CF93423@despammed.com> <7f1fa3aa.0203081034.12a7bd11@posting.google.com> <3C891463.C4C09795@despammed.com> NNTP-Posting-Host: 205.232.38.14 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1018241838 15106 127.0.0.1 (8 Apr 2002 04:57:18 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 8 Apr 2002 04:57:18 GMT Xref: archiver1.google.com comp.lang.ada:22208 Date: 2002-04-08T04:57:18+00:00 List-Id: Wes Groleau wrote in message news:<3C891463.C4C09795@despammed.com>... > > There's the justification: 'Size is sometimes > non-static, and requiring a compiler to distinguish when > imposes too much complexity. No, this is quite wrong (and there is quite a bit of misinformation in this thread). First, it is not correct that 'Size is always non-static. As is quite clear from RM 4.9 7 an attribute_reference that denotes a scalar value, and whose prefix denotes a static scalar subtype; any application of 'Size to a static scalar subtype is indeed static. So, how come size of other types is never static. It does NOT have to do with distinguishing constant and dynamic cases -- that's trivial and has to be done anyway. What is important to realize is that laying out composite types is non-trivial, highly target dependent, and likely to be done by the target back end of a compiler. It would be a pain if this processing had to be done early on in the front end.