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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,caabf5265fad78e5 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!not-for-mail From: anon@anon.org (anon) Newsgroups: comp.lang.ada Subject: Re: unsigned type Date: Thu, 16 Jul 2009 13:54:59 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: <72cf874a-ebdc-4a19-9e05-ee9b9a3c245a@l28g2000vba.googlegroups.com> Reply-To: anon@anon.org (anon) NNTP-Posting-Host: dopUewGfW8rcS1Bz+EsRwQ.user.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.7.9 X-Newsreader: IBM NewsReader/2 2.0 Cancel-Lock: sha1:3BV89zFxvX5PbuiucpkGjlKLrRM= Xref: g2news2.google.com comp.lang.ada:7085 Date: 2009-07-16T13:54:59+00:00 List-Id: The Slice rule RM 4.1.2 ( 7 ) does not stop a vendor from checking the bounds type first. In GNAT, using the last program I posted you will see that GNAT, first checks the lower bound type then checks for a "null range". Which somewhat goes against the rule RM 4.1.2 ( 7 ). In <72cf874a-ebdc-4a19-9e05-ee9b9a3c245a@l28g2000vba.googlegroups.com>, Martin writes: >On Jul 13, 11:03=A0pm, a...@anon.org (anon) wrote: >> The RM defines, what a "null range" is, but the RM does not say that you = >must >> first check for "null range" then the type and for a valid range in an ar= >ray or >> string. =A0The RM allows any vendor to check the type first before checki= >ng for a >> "null range" condition. Or it could be that the RM might assume that subt= >ype >> checking has already been done, because the RM assume that the compiler a= >nd >> runtime has check that the bound is a scalar type. > >RM 4.1.2(7), 2nd sentence: > >"If the slice is not a null slice (a slice where the discrete_range is >a null range), then a check is made that the bounds of the >discrete_range belong to the index range of the array denoted by the >prefix. Constraint_Error is raised if this check fails." > >Which bit of 'if' followed by 'then' are you having trouble with? > >Cheers >-- Martin >