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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,75ce2ead897158b2 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.224.172.200 with SMTP id m8mr3858377qaz.0.1365103289439; Thu, 04 Apr 2013 12:21:29 -0700 (PDT) X-Received: by 10.49.127.145 with SMTP id ng17mr766550qeb.9.1365103289415; Thu, 04 Apr 2013 12:21:29 -0700 (PDT) Path: ef9ni5qab.0!nntp.google.com!t2no39002700qal.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 4 Apr 2013 12:21:29 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=149.32.224.34; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 149.32.224.34 References: <0c77e832-e12b-446d-af24-78d77c358f1e@googlegroups.com> <25ee066d-3270-4efd-829f-ed40b04c0655@googlegroups.com> <89292c53-1d4e-48a7-b2ae-a10983ef4168@googlegroups.com> <55c932fa-73a4-4999-a913-71d0d8ff4782@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <282c7f39-f77e-416c-81f8-1f8fb5ad6d0a@googlegroups.com> Subject: Re: My bug or else regarding Visibility Rules From: Anh Vo Injection-Date: Thu, 04 Apr 2013 19:21:29 +0000 Content-Type: text/plain; charset=ISO-8859-1 Date: 2013-04-04T12:21:29-07:00 List-Id: On Thursday, April 4, 2013 1:19:54 AM UTC-7, Simon Wright wrote: > Anh Vo writes: > On Tuesday, April 2, 2013 1:16:34 PM UTC-7, Simon Wright wrote: >> I believe that attribute 'Old is allowed in post-conditions only. > This is a bug in GNAT, fixed in GCC 4.8.0 (I had tested with GNAT GPL > 2012, which allows it). It is good to know. >> I do not understand this. Why isn't Buffer(1) valid if my index starts at 1? > Because after the index has wrapped round Buffer'Old(1) will not be the > same as Buffer(1). In this case the loop will drop out because loop lower end is greater than loop upper end. >> This is another array index option. > No. You wrote > (Index mod Length) + 1 > but it should be > (Index + 1) mod Length (In_Index + 1) mod length will raise Constraint_Error when the Queue is just full. In fact, (10 + 1) > 10 when the queue has the lenght of 10.