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,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-02 07:05:26 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out.usenetserver.com!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3A7ABEBC.F8A33272@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: Thin pointers and the GNAT RM Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 02 Feb 2001 15:05:26 GMT NNTP-Posting-Host: 63.178.185.191 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 981126326 63.178.185.191 (Fri, 02 Feb 2001 07:05:26 PST) NNTP-Posting-Date: Fri, 02 Feb 2001 07:05:26 PST Xref: supernews.google.com comp.lang.ada:4855 Date: 2001-02-02T15:05:26+00:00 List-Id: 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