comp.lang.ada
 help / color / mirror / Atom feed
* How to get around "access type must not be outside generic unit"
@ 2006-12-17 10:07 Michael Erdmann
  2006-12-17 12:45 ` Pascal Obry
  2007-01-23 18:18 ` [Revisited] How to get around "access type must not be outside generic unit" (was: How to get around "access type must not be outside generic unit") Dmitry A. Kazakov
  0 siblings, 2 replies; 19+ messages in thread
From: Michael Erdmann @ 2006-12-17 10:07 UTC (permalink / raw)


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




^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2007-01-25 11:07 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-17 10:07 How to get around "access type must not be outside generic unit" Michael Erdmann
2006-12-17 12:45 ` Pascal Obry
2006-12-17 14:28   ` Michael Erdmann
2006-12-17 15:53     ` Pascal Obry
2006-12-17 20:49     ` Robert A Duff
2006-12-18  3:35   ` Brian May
2006-12-18  7:49     ` Jean-Pierre Rosen
2006-12-18 23:15       ` Brian May
2006-12-19  1:48         ` Randy Brukardt
2006-12-19  7:41         ` Jean-Pierre Rosen
2006-12-18 20:32     ` Michael Erdmann
2006-12-18 20:57       ` Randy Brukardt
2007-01-23 18:18 ` [Revisited] How to get around "access type must not be outside generic unit" (was: How to get around "access type must not be outside generic unit") Dmitry A. Kazakov
2007-01-24  0:57   ` Randy Brukardt
2007-01-24 11:42     ` [Revisited] How to get around "access type must not be outside generic unit" Dmitry A. Kazakov
2007-01-24 11:58       ` Ludovic Brenta
2007-01-24 13:46         ` Dmitry A. Kazakov
2007-01-24 20:50       ` Randy Brukardt
2007-01-25 11:07         ` Dmitry A. Kazakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox