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=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no 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-10 10:41:46 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!news-in-sanjose!cyclone-sf.pbi.net!151.164.30.35!cyclone.swbell.net!bos-service1.ext.raytheon.com!dfw-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3CB47947.466E0E81@despammed.com> From: Wes Groleau Reply-To: wesgroleau@despammed.com X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en,es-MX,es,pt,fr-CA,fr MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: System.Address'Size - not a static integer expression? 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> <5ee5b646.0204072057.48d33742@posting.google.com> <3CB1B473.CF6E93AD@despammed.com> <5ee5b646.0204091754.5dcfd16d@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 10 Apr 2002 12:41:27 -0500 NNTP-Posting-Host: 151.168.144.162 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.raytheon.com 1018460505 151.168.144.162 (Wed, 10 Apr 2002 12:41:45 CDT) NNTP-Posting-Date: Wed, 10 Apr 2002 12:41:45 CDT Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:22327 Date: 2002-04-10T12:41:27-05:00 List-Id: > > I found something in the RM that basically insisted that > > 'Size is non-static. > > Well since you are confused over what static means, I doubt > this memory is relevant. Once again, while it is true that Static to me (before Ada 95) meant a value that you can determine at compile time. The RM apparently has a different meaning when it disallowed for xxx'size use .... (A) because 'size is not static The screwed up C definition of static is off in some other planet. What I was saying was that I tried to use xxx'size somewhere that only static values were allowed and it was rejected by both GNAT and Apex. At the time, I considered the expression I used static because it COULD BE determined at compile time. But I DID find something in the RM that said 'Size cannot be used where a static expression is required. > all static expressions have known-at-compile time values, > the converse is obviously false (known at compile time values are not > always static). > > Why? Because it is obviously recursively undecidable whether a given > expression has a known at compile time > value (finding all such expressions requires being able > to prove all possible theorems which of course is not > possible). So the language had two choices: > > o Try to pin down a subset of known at compile time > expressions and require all compilers to agree on > this subset in cases where staticness of expressions > has semantic significance (e.g. case tags). My point exactly: 'Size is not in this subset, no matter how easy it may be to determine the value. > So most certainly GNAT and Apex (and any other correct Ada compiler) > agree on what Size references are static and what > are not. If the prefix is a static scalar subtype, the size > reference is static, otherwise it is non-static. End of So you are saying that it IS in this subset if the prefix is a static scalar subtype? First, this is circular, defining static (partially) in terms that use the word static. Second, I can no longer remember whether it was a static scalar subtype, but I do remember (1) the rejection surprised me after years of Ada experience and (2) the reference _I_ found for (A) above did not have the "static scalar subtype" exception in it. It just plain said that 'Size is not static. -- Wes Groleau http://freepages.rootsweb.com/~wgroleau