comp.lang.ada
 help / color / mirror / Atom feed
* compilation problem with gnat 4.4 about access type
@ 2009-12-01 16:28 xavier grave
  2009-12-02 12:55 ` xavier grave
  0 siblings, 1 reply; 2+ messages in thread
From: xavier grave @ 2009-12-01 16:28 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm trying to compile a package containing an abstract remote type with
gnat 4.4 (using debian package from unstable amd64 and powerpc arch) at
the line declaring an access to the type I get this message :

events_receivers.ads:27:09: expected type
"Ada.Streams.Stream_Element_Offset"
events_receivers.ads:27:09: found type "Standard.Long_Integer"

The offending code :
with Ada.Streams;

package Events_Receivers is
   pragma Remote_Types;
   type Supported_Events_Type is (Log4ada_Event, String_Event);
   type Events_Receiver_Type is abstract tagged limited private;
   type Events_Receivers_Class_Access is access all
Events_Receiver_Type'Class; -- this is line 27
...

The same code with gnat gpl 2009 compile without problem

Does somebody already have experimented such behaviour ?

Thanks in advance, xavier
PS: the command line for the offending compilation :
gcc-4.4 -c
- -I/home/narval/org.log4Ada/server/obj/x86_64//../../../client/src
- -I/home/narval/org.log4Ada/server/obj/x86_64//../../src
- -I/home/narval/org.log4Ada/server/obj/x86_64//../../demos
- -I/home/narval/org.log4Ada/server/obj/x86_64//../../../utilities/src
- -I/usr/share/ada/adainclude/polyorb -I- -gnatA
/home/narval/org.log4Ada/client/src/events_receivers.adb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksVRCkACgkQVIZi0A5BZF6Y9gCgp4dUj4o5Il+DZ1i3SSaUOgNo
fKkAn27vTSgUP2hJDESL6A12iJ8bNdM6
=NzYF
-----END PGP SIGNATURE-----



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

* Re: compilation problem with gnat 4.4 about access type
  2009-12-01 16:28 compilation problem with gnat 4.4 about access type xavier grave
@ 2009-12-02 12:55 ` xavier grave
  0 siblings, 0 replies; 2+ messages in thread
From: xavier grave @ 2009-12-02 12:55 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

More information in my bug quest :
If I remove the dependence on Ada.Streams in the package no more error...

Here is the full Package specification with the offending lines commented :
- -- with Ada.Streams;

package Events_Receivers is
   pragma Remote_Types;
   type Supported_Events_Type is (Log4ada_Event, String_Event);
   type Events_Receiver_Type is abstract tagged limited private;
   type Events_Receivers_Class_Access is access all
Events_Receiver_Type'Class;
   procedure Send_Event
     (Events_Receiver : not null access Events_Receiver_Type;
- --      Event : Ada.Streams.Stream_Element_Array;
      Event_Type : Supported_Events_Type := Log4ada_Event) is abstract;
   function Event_Receiver_Is_Alive
     (Events_Receiver : not null access Events_Receiver_Type) return
Boolean;
   Event_Type_Not_Supported : exception;
private
   type Events_Receiver_Type is abstract tagged limited null record;
end Events_Receivers;

xavier grave a �crit :
> Hi,
> 
> I'm trying to compile a package containing an abstract remote type with
> gnat 4.4 (using debian package from unstable amd64 and powerpc arch) at
> the line declaring an access to the type I get this message :
> 
> events_receivers.ads:27:09: expected type
> "Ada.Streams.Stream_Element_Offset"
> events_receivers.ads:27:09: found type "Standard.Long_Integer"
> 
> The offending code :
> with Ada.Streams;
> 
> package Events_Receivers is
>    pragma Remote_Types;
>    type Supported_Events_Type is (Log4ada_Event, String_Event);
>    type Events_Receiver_Type is abstract tagged limited private;
>    type Events_Receivers_Class_Access is access all
> Events_Receiver_Type'Class; -- this is line 27
> ...
> 
> The same code with gnat gpl 2009 compile without problem
> 
> Does somebody already have experimented such behaviour ?
> 
> Thanks in advance, xavier
> PS: the command line for the offending compilation :
> gcc-4.4 -c
> -I/home/narval/org.log4Ada/server/obj/x86_64//../../../client/src
> -I/home/narval/org.log4Ada/server/obj/x86_64//../../src
> -I/home/narval/org.log4Ada/server/obj/x86_64//../../demos
> -I/home/narval/org.log4Ada/server/obj/x86_64//../../../utilities/src
> -I/usr/share/ada/adainclude/polyorb -I- -gnatA
> /home/narval/org.log4Ada/client/src/events_receivers.adb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksWY9AACgkQVIZi0A5BZF7Q5wCfTvWFM45yHIeUNgZx4RwHeEg0
bbgAniDaklktZHPzvlxqhQTN6aevXorz
=802s
-----END PGP SIGNATURE-----



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

end of thread, other threads:[~2009-12-02 12:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-01 16:28 compilation problem with gnat 4.4 about access type xavier grave
2009-12-02 12:55 ` xavier grave

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