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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.9.196 with SMTP id 65mr7207568ioj.11.1445417657225; Wed, 21 Oct 2015 01:54:17 -0700 (PDT) X-Received: by 10.182.232.166 with SMTP id tp6mr3480obc.10.1445417657205; Wed, 21 Oct 2015 01:54:17 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!kq10no24495575igb.0!news-out.google.com!z4ni27442ign.0!nntp.google.com!kq10no20599285igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 21 Oct 2015 01:54:17 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=46.218.2.213; posting-account=21X1fwoAAABfSGdxRzzAXr3Ux_KE3tHr NNTP-Posting-Host: 46.218.2.213 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <98fcf225-fdec-401c-80b3-321e2ac65f6b@googlegroups.com> Subject: Task interface and entries with aliased parameters From: Hadrien Grasland Injection-Date: Wed, 21 Oct 2015 08:54:17 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:28008 Date: 2015-10-21T01:54:17-07:00 List-Id: Hello, Using GNAT GPL 2015, I am having some trouble with task interfaces which fe= ature entries that take aliased parameters. Whenever I try to implement one, GNAT refuses to compile the resulting code= , claiming that my implementation does not match the associated interface. = However, I am pretty convinced that it does. What I would like to know is i= f I am getting task interfaces wrong, or if this is a bug in GNAT that I sh= ould report. Here is a basic code example that reproduces the problem : =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D procedure Main is -- Define a task interface with one method having an aliased output package Aliased_Entry_Params is type Aliased_Interface is task interface; procedure Aliased_Entry (Object : Aliased_Interface; Output : aliased= out Integer) is abstract; end Aliased_Entry_Params; =20 -- This task should implement the interface... but GNAT claims it doesn'= t task Aliased_Task is new Aliased_Entry_Params.Aliased_Interface with overriding entry Aliased_Entry (Output : aliased out Integer); end Aliased_Task; =20 -- Dummy body task body Aliased_Task is begin accept Aliased_Entry (Output : aliased out Integer) do Output'Access.all :=3D -256; end Aliased_Entry; end Aliased_Task; =20 begin null; end Main; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D And here is the GNAT compilation output on my computer : main.adb:13:24: not subtype conformant with operation inherited at line 12 main.adb:13:24: aliased parameter mismatch main.adb:13:24: not subtype conformant with declaration at line 7 main.adb:13:24: aliased parameter mismatch gprbuild: *** compilation phase failed Thanks in advance for your help ! Hadrien