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=-3.2 required=3.0 tests=BAYES_00,NICE_REPLY_A, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R.Carter" Newsgroups: comp.lang.ada Subject: Re: GNAT or Language Problems? Date: Sat, 17 Jun 2023 22:49:46 +0200 Organization: A noiseless patient Spider Message-ID: References: <0001HW.2A3E29DC00595EA070000B60138F@news.individual.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 17 Jun 2023 20:49:46 -0000 (UTC) Injection-Info: dont-email.me; posting-host="f952493f2451a99695ca575bfaa57a3e"; logging-data="1310434"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rQ6zxPl5FNw9UeZDiqs/LMxSEFSvIxoQ=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Cancel-Lock: sha1:Gepuj4BJNL2pxtgmk3HXorHu+kY= In-Reply-To: <0001HW.2A3E29DC00595EA070000B60138F@news.individual.net> Content-Language: en-US Xref: news.eternal-september.org comp.lang.ada:65326 List-Id: On 2023-06-17 19:50, Bill Findlay wrote: > > I get, in macOS, with: > >> gcc -c -gnatl12 b_strings_prob.ads > > and the same with with: > >> gnatmake -gnatl2022 b_strings_prob.ads > >> 13 lines: No errors > > Bug in GNAT 13?? Right. This was introduced in GNAT 13. I use the -gnat12 switch, but the error occurs regardless. The only thing I can see in the ARM-12 (and still in the ARM) that might apply is 7.4(6/3): "If the deferred constant declaration includes a subtype_indication S that defines a constrained subtype, then the constraint defined by the subtype_indication in the full declaration shall match the constraint defined by S statically.[ On the other hand, if the subtype of the deferred constant is unconstrained, then the full declaration is still allowed to impose a constraint. The constant itself will be constrained, like all constants;]" This might apply if the subtype in the deferred declaration, which uses the default discriminant, is considered constrained, since the discriminant applied from the value supplied for the full declaration is different from the default. I'm not sure. This wording (without the brackets) has been in the ARM since 1995. -- Jeff Carter "I was in love with a beautiful blonde once, dear. She drove me to drink. That's the one thing I'm indebted to her for." Never Give a Sucker an Even Break 109