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_40,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:ac8:458c:: with SMTP id l12mr10280294qtn.296.1617345054492; Thu, 01 Apr 2021 23:30:54 -0700 (PDT) X-Received: by 2002:a25:6b44:: with SMTP id o4mr17128742ybm.161.1617345054216; Thu, 01 Apr 2021 23:30:54 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 1 Apr 2021 23:30:54 -0700 (PDT) Injection-Info: google-groups.googlegroups.com; posting-host=84.209.88.37; posting-account=bPTmZAoAAAC_6HP9XLKB9aAAxBa6BuOR NNTP-Posting-Host: 84.209.88.37 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6901cec3-b7b1-48c8-98fe-0360572175c2n@googlegroups.com> Subject: Did I find a bug here? From: reinert Injection-Date: Fri, 02 Apr 2021 06:30:54 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:61726 List-Id: Assume this simple program: procedure test0 is type ABC_Type is (A,B,C); subtype AB_Type is ABC_Type with Static_Predicate => AB_Type in A | B; X : ABC_type := A; begin -- alternative 1: case AB_Type(X) is when A => null; when B => null; when others => null; -- ??? should the compiler complain here? end case; --alternative 2: case AB_Type(X) is when A => null; when B => null; end case; end test0; Should the compiler complain about "when others => null" here? My compiler does not (running debian 10, updated, gnat-8). I find it strange that both alternatives goes through. reinert