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-Thread: 103376,8f7d6c5172a1d41b,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!not-for-mail From: Michael Erdmann Newsgroups: comp.lang.ada Subject: How to get around "access type must not be outside generic unit" Date: Sun, 17 Dec 2006 11:07:51 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de jscL7cmiChPHKbgIpFStCABFhRi0hV1oaCI7AqEGH8X/ZAl5e4XLAS X-Orig-Path: hal.boavista.snafu.de!news User-Agent: Thunderbird 1.5 (X11/20060317) Xref: g2news2.google.com comp.lang.ada:7928 Date: 2006-12-17T11:07:51+01:00 List-Id: Dear all, after installing the latest version of GNAT on my linux box i encounter a problem with old source code. The Fragment below shows the problem: ---- usage.ads generic type Data_Type is private; package Usage is function Install return Boolean ; procedure Doit( X : in out Data_Type ); end Usage; ---- usage.adb with Base; use Base; package body Usage is function Install return Boolean is begin return True; end Install; procedure Doit( X : in out Data_Type ) is begin null; end Doit; begin Register("Doit", Install'Access); <<<< offending line end Usage; gnade@hal:~/test> gnatmake -c usage.adb gcc -c usage.adb usage.adb:16:28: access type must not be outside generic unit gnatmake: "usage.adb" compilation error What is the reason for this new compiler check and what can i do about it? Regards M.Erdmann