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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.66.196 with SMTP id h4mr16789745pat.22.1406053060355; Tue, 22 Jul 2014 11:17:40 -0700 (PDT) Path: border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!h18no5691976igc.0!news-out.google.com!cz11ni19100qab.1!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 22 Jul 2014 13:17:39 -0500 Date: Tue, 22 Jul 2014 14:17:38 -0400 From: Peter Chapin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Question about pragma Restrictions(No_Recursion) Message-ID: X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-wKxWI1+LV4B7VFQQUQXykB22mqUtkkDzYGCGuvE0EJ9tqXLkxC2uDdFxTNAPyeQb9ls0pX3s/V2mV1T!10thFDtLvBQmRtqmtMk/nLpQzzRrwdFfBShUsBTXa1qPAesaNYXmIcwnVKNH8+s= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2001 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Xref: number.nntp.dca.giganews.com comp.lang.ada:187794 Date: 2014-07-22T14:17:38-04:00 List-Id: Hello! In section H.4 of the Ada RM No_Recursion is described by saying, "As part of the execution of a subprogram the same subprogram is not invoked." Paragraph 27 says, "Program execution is erroneous if pragma Restrictions(No_Recursion) has been specified and a subprogram is invoked as part of its own execution..." I understand this to mean that the restriction, in this case, is really a restriction on what the programmer does. The compiler is not obligated to detect recursive constructs, however it could potentially (maybe) simplify its runtime system on the assumption that no recursion exists. If that assumption is wrong, well it's the programmer's problem. This is to be contrasted with a number of the other restrictions listed in H.4 that seem to put requirements on the compiler to explicitly diagnose attempts to use the restricted feature. Does that sound right? Peter