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,e2b8f0c90a856492 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-02 08:43:21 PST Path: supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3A7AD5B0.3EE5001D@earthlink.net> From: "Marc A. Criley" Organization: Quadrus Corporation X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Thin pointers and the GNAT RM References: <3A7ABEBC.F8A33272@earthlink.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 02 Feb 2001 16:43:20 GMT NNTP-Posting-Host: 158.252.122.196 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 981132200 158.252.122.196 (Fri, 02 Feb 2001 08:43:20 PST) NNTP-Posting-Date: Fri, 02 Feb 2001 08:43:20 PST Xref: supernews.google.com comp.lang.ada:4867 Date: 2001-02-02T16:43:20+00:00 List-Id: I've been informed that the GNAT RM is in error, the correct clause uses Standard'Address_Size: type X is access all String; for X'Size use Standard'Address_Size; Marc "Marc A. Criley" wrote: > > While perusing the super-secret GNAT 3.13p Reference Manual to detemine > how to force a pointer to an unconstrained array to use a "thin" > pointer, I found exactly what I was looking for: > > To specify a thin pointer, use a size clause for the type, for example: > > type X is access all String; > for X'Size use System.Address'Size; > > However, employing this approach in a test program... > > ------------------------------------------- > with System; > > procedure Pt is > > type X is access all String; > for X'Size use System.Address'Size; > > begin > null; > end Pt; > -------------------------------------------- > > ...produces the following error message: > > pt.adb:6:33: static integer expression required here > > By replacing "System.Address'Size" with 32, the code compiles and works > correctly. > > (This information is also being sent to report@gnat.com.) > > Marc A. Criley > Senior Staff Engineer > Quadrus Corporation > www.quadruscorp.com