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 2002:a24:5088:: with SMTP id m130-v6mr196035itb.7.1523958663988; Tue, 17 Apr 2018 02:51:03 -0700 (PDT) X-Received: by 2002:a9d:bc8:: with SMTP id 66-v6mr71499oth.10.1523958663872; Tue, 17 Apr 2018 02:51:03 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.swapon.de!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!k65-v6no2888785ita.0!news-out.google.com!15-v6ni3522itg.0!nntp.google.com!k65-v6no2888779ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 17 Apr 2018 02:51:03 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=80.139.97.153; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 80.139.97.153 References: <702e2422-a93f-4200-9749-5122c3d0f899@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <04f19a56-7fab-416e-8ec0-b9a73e239e90@googlegroups.com> Subject: Re: Finalization of library level tasks From: AdaMagica Injection-Date: Tue, 17 Apr 2018 09:51:03 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2640 X-Received-Body-CRC: 2222534901 Xref: reader02.eternal-september.org comp.lang.ada:51551 Date: 2018-04-17T02:51:03-07:00 List-Id: Am Montag, 16. April 2018 17:26:42 UTC+2 schrieb Dmitry A. Kazakov: > >> So GNAT implementation is wrong and this one is illegal? > >> > >> =C2=A0=C2=A0 task body T is > >> =C2=A0=C2=A0 begin > >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 loop > >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 exit when not T'Call= able; > >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ... -- Do something > >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 end loop; > >> =C2=A0=C2=A0 end T; > > I don't know what Gnat is doing, but while T is normally active, > > T'Callable is True. This is clearly an infinite loop. >=20 > It terminates under GNAT. Thus my question. As I understand RM 9.3, when this task T is going out of scope, i.e. if it = is declared inside for instance in a block, the block can only be left when= the task is completed (the block is the master, see 7.6.1), and I cannot s= ee that the conditions on T to be completed can ever be fulfilled for T. Thus the block cannot be left, the program is blocked. Gnat seems wrong to = me.