comp.lang.ada
 help / color / mirror / Atom feed
From: "Bobby D. Bryant" <bdbryant@mail.utexas.edu>
Subject: Instantiation problem in generic.
Date: Tue, 22 Jul 2003 03:33:51 -0600
Date: 2003-07-22T03:33:51-06:00	[thread overview]
Message-ID: <pan.2003.07.22.09.33.50.152323@mail.utexas.edu> (raw)


Am I interpreting this GNAT message correctly? (the compiler is GNAT 3.15p)

For the code in the body of a generic library package (pardon the
wrapping) -

-- Set up callbacks for the window manager's decorations:
GTK_Stuff.Widget_Callback_Returning_Boolean.Connect
   (Widget => Histogram_Window,
    Name   => "delete_event",
    Marsh  => GTK_Stuff.Widget_Callback_Returning_Boolean.To_Marshaller
                 (Close_Histogram_Window_Fn'Access));
--
GTK_Stuff.Widget_Callback.Connect
   (Widget => Histogram_Window,
    Name   => "destroy",
    Marsh  => GTK_Stuff.Widget_Callback.To_Marshaller
                 (Close_Histogram_Window'Access));

I get error messages when compiling the package body (line numbers off due
to Usenet wrapping) -

746. Marsh  => GTK_Stuff.Widget_Callback_Returning_Boolean.To_Marshaller
                  (Close_Histogram_Window_Fn'Access));
        >>> access type must not be outside generic body

750. Marsh  => GTK_Stuff.Widget_Callback.To_Marshaller
                  (Close_Histogram_Window'Access));
        >>> access type must not be outside generic body

The Close_Histogram_* subprograms are defined within the body of the
generic package, so I don't understand what the compiler is complaining
about.

If I put declarations in the package spec, whether in the public area or
the private area, the message is suppressed when compiling the package,
but it still occurs when compiling the program that instantiates it.

Any suggestions?

-- 
Bobby Bryant
Austin, Texas




             reply	other threads:[~2003-07-22  9:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-22  9:33 Bobby D. Bryant [this message]
2003-07-22 18:26 ` Instantiation problem in generic Randy Brukardt
replies disabled

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