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,fa2221f5dd5f5100,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-21 13:23:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.airnews.net!cabal12.airnews.net!usenet From: David Gressett Newsgroups: comp.lang.ada Subject: Newbie question about pointers in GNAT 3.15p on Windows 2000 Date: Fri, 21 Feb 2003 15:20:32 -0600 Organization: Airnews.net! at Internet America Message-ID: <816517EFDE1ABFFF.672EFD9C99861B55.1999743ACE4BA64B@lp.airnews.net> X-Orig-Message-ID: Abuse-Reports-To: abuse at airmail.net to report improper postings NNTP-Proxy-Relay: library1-aux.airnews.net NNTP-Posting-Time: Fri Feb 21 15:20:13 2003 NNTP-Posting-Host: !]Cl@1k-X+FKAY> (Encoded at Airnews!) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:34389 Date: 2003-02-21T15:20:32-06:00 List-Id: I have the following package which I am trying to compile with GNAT 3.15p on Windows 2000: ----------------------------------------------------------------------- package Miscellaneous3 is function X return String; end Miscellaneous3; package body Miscellaneous3 is ----------------------- -- X -- ----------------------- type P_Integer is access all Integer; function X return String is Bufsize: Aliased Integer; P_Size: P_Integer; begin Bufsize := 1; P_Size := BufSize'Access; return ""; end X; end Miscellaneous3; --------------------------------------------------------------------- Compilation produces this error message: miscellaneous3.adb:17:15 non-local pointer cannot point to local object I have no idea what "local" means here - both the pointer P_Size and the pointed-to variable Bufsize are defined in the same place. What am I doing wrong?