From mboxrd@z Thu Jan 1 00:00:00 1970 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R.Carter" Newsgroups: comp.lang.ada Subject: Re: GNAT Error? Date: Sat, 17 Feb 2024 00:45:08 +0100 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: Fri, 16 Feb 2024 23:45:08 -0000 (UTC) Injection-Info: dont-email.me; posting-host="2aa64debafb9d67966120ddede750c79"; logging-data="4061632"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+DCygxvaJKhkkkteUNI8ElEuxLWE1X0hs=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:pLlzJSl++rBGCOIDG1gqR/hCXFE= In-Reply-To: Content-Language: en-US Xref: news.eternal-september.org comp.lang.ada:66067 List-Id: On 2024-02-17 00:26, Niklas Holsti wrote: > > You showed two copies of the declaration (spec) of package Alloc_Err, but you > did not show the body of the package. Based on the error message pointing to > alloc_err.adb (and not .ads), GNAT thinks the error is in the body. Please show > the body of the package. > Oops. Well, I've managed to simplify the reproducer to procedure Alloc2 is type Grid is array (Positive range <>, Positive range <>) of Integer with Dynamic_Predicate => Grid'First (1) = 1 and Grid'First (2) = 1; type Grid_Ptr is access Grid; Data : Grid_Ptr := new Grid (1 .. 10, 1 .. 20); begin -- Alloc2 null; end Alloc2; which results in alloc2.adb:7:23: error: invalid use of subtype mark in expression or call Line 7 is the declaration of Data. -- Jeff Carter "I like it when the support group complains that they have insufficient data on mean time to repair bugs in Ada software." Robert I. Eachus 91