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 11:21:18 +0200 Organization: A noiseless patient Spider Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 17 Jun 2023 09:21:18 -0000 (UTC) Injection-Info: dont-email.me; posting-host="49e26f95efab3f074b64c142600b7dc2"; logging-data="1258798"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+jmnoEp6ImmRVm8SL5ocmwLoVOY1w5w/o=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Cancel-Lock: sha1:SbJKyvXhPWDIQ0EtLtNhJqCelzQ= In-Reply-To: Content-Language: en-US Xref: news.eternal-september.org comp.lang.ada:65324 List-Id: On 2023-06-17 09:28, Randy Brukardt wrote: > Regarding your second problem, refer to AI22-0041-1. > > Essentially, there are problems if predicates are involved. We changed the > rule to require static compatibility (as a Binding Interpretation). I don't > have the energy to look up what "static compatibility" requires in this case > (enjoy figuring out 4.9.1). In some cases, it requires static matching, in > others, it has weaker requirements. There are no predicates involved. One can cut it down to just the type and constant: package B_Strings_Prob is type B_String (Max_Length : Positive := 1_000) is tagged limited private; Null_B_String : constant B_String; -- A string of zero characters private -- B_Strings_Prob type B_String (Max_Length : Positive := 1_000) is tagged limited record Len : Natural := 0; Value : String (1 .. Max_Length) := (1 .. Max_Length => ' '); end record; Null_B_String : constant B_String := (Max_Length => 1, others => <>); end B_Strings_Prob; and still get the error: $ gnatmake -gnatc b_strings_prob.ads x86_64-linux-gnu-gcc-13 -c -gnatc b_strings_prob.ads b_strings_prob.ads:12:04: error: subtype does not statically match deferred declaration at line 5 gnatmake: "b_strings_prob.ads" compilation error I don't see any mention of AI22-0041-1 in ARM 7.4. > I don't have the time or energy tonight to look into your other problem. > (I'm waiting for a backup to finish, or I would have already gone home -- > since I only got back from Lisbon last night, I'm not equipped for my usual > late night work...) I'm surprised you're this functional already. -- 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