From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader01.eternal-september.org!aioe.org!Yr2L9qaRshuL+yFKTxsDBA.user.46.165.242.75.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Is this an error in compiler Date: Mon, 12 Sep 2022 08:05:18 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <4eecf346-667a-4dee-80b2-c3597b0f6fa7n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: gioia.aioe.org; logging-data="18909"; posting-host="Yr2L9qaRshuL+yFKTxsDBA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (darwin) Cancel-Lock: sha1:J0XmtYPAuWMY5xI/7JMP9prjAhE= X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:64324 List-Id: Niklas Holsti writes: > I don't find these "raise .. when" or "return .. when" constructs in > the Ada 2022 RM draft, so I don't think the ARG has adopted them > (yet). I suspect they are GNAT extensions, as is the ability to make a > subtype of String with a fixed lower index bound of 1 but an > unconstrained upper bound (1 .. <>), as also done in the OP's code. Indeed. c0a.adb:7:37: error: fixed-lower-bound array is a GNAT specific extension c0a.adb:7:37: error: unit must be compiled with -gnatX switch c0a.adb:26:28: error: return when statement is a GNAT specific extension c0a.adb:26:28: error: unit must be compiled with -gnatX switch c0a.adb:27:59: error: raise when statement is a GNAT specific extension c0a.adb:27:59: error: unit must be compiled with -gnatX switch