From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=BAYES_20,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:ad4:4bce:: with SMTP id l14mr15617699qvw.30.1617428763031; Fri, 02 Apr 2021 22:46:03 -0700 (PDT) X-Received: by 2002:a25:8b0f:: with SMTP id i15mr23766041ybl.277.1617428762885; Fri, 02 Apr 2021 22:46:02 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 2 Apr 2021 22:46:02 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=84.209.88.37; posting-account=bPTmZAoAAAC_6HP9XLKB9aAAxBa6BuOR NNTP-Posting-Host: 84.209.88.37 References: <6901cec3-b7b1-48c8-98fe-0360572175c2n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2bb293da-8c8d-471c-ab0a-93fbc0033485n@googlegroups.com> Subject: Re: Did I find a bug here? From: reinert Injection-Date: Sat, 03 Apr 2021 05:46:03 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:61730 List-Id: .....snip... > values. However, note that the compiler may choose to raise > Constraint_Error even if there is an "others" alternative; RM 5.4 > (10.d). To avoid that uncertainty, the program can perform an explicit > 'Valid check before the case statement. Could AB_Type(X) in "case AB_Type(X) is" function as such a valid check? I try as much as possible to avoid "others" to make the compiler point out or to remind (in my large programs) where to add (or check for) possible alternatives in case I extend the value range of a variable. Then it may happen I need to put in for example something like "when A | B | C => null;" instead of "others". reinert