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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f727b37cf2b2e501,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-31 12:40:32 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!news-mue1.dfn.de!news-ham1.dfn.de!news.uni-hamburg.de!cs.tu-berlin.de!not-for-mail From: Stephan Heinemann Newsgroups: comp.lang.ada Subject: No_Abort_Statements Date: 31 Jul 2003 19:40:32 GMT Organization: Technische Universitaet Berlin, Deutschland Message-ID: NNTP-Posting-Host: fiesta.cs.tu-berlin.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.cs.tu-berlin.de 1059680432 3516 130.149.17.156 (31 Jul 2003 19:40:32 GMT) X-Complaints-To: news@cs.tu-berlin.de NNTP-Posting-Date: 31 Jul 2003 19:40:32 GMT User-Agent: tin/1.4.6-20020816 ("Aerials") (UNIX) (SunOS/5.9 (sun4u)) Xref: archiver1.google.com comp.lang.ada:41102 Date: 2003-07-31T19:40:32+00:00 List-Id: D.7.5 says No_Abort_Statements There are no abort_statements, and there are no calls on Task_Identification.Abort_Task. My compiler (gnat) detects only the violation caused by "abort T;". But I get away with "Abort_Task(T'Identity);" or using ATC via select (see below). Now, I am not quite sure what this restriction really covers... Abort_Task should obviously be detected but what about ATC? Thanks in advance, Stephan pragma Restrictions(No_Abort_Statements); with Ada.Task_Identification; use Ada.Task_Identification; with Ada.Text_IO; use Ada.Text_IO; procedure No_Abort_Statements is task type A; task body A is begin loop Put_Line(Image(Current_Task)); delay 0.5; end loop; end A; T : A; begin abort T; --Abort_Task(T'Identity); --select -- delay 1.0; -- Put_Line("aborted"); --then abort -- declare -- T : A; -- begin -- delay 2.0; -- end; --end select; end No_Abort_Statements;