From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: GNAT Error?
Date: Sat, 17 Feb 2024 00:04:21 -0600 [thread overview]
Message-ID: <uqpi78$9mms$1@dont-email.me> (raw)
In-Reply-To: uqos24$3rue0$2@dont-email.me
I don't see anything wrong with that off-hand. It's probably a compiler bug
of some sort. - Randy.
"Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not> wrote in message
news:uqos24$3rue0$2@dont-email.me...
> 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
>
next prev parent reply other threads:[~2024-02-17 6:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-16 22:51 GNAT Error? Jeffrey R.Carter
2024-02-16 23:26 ` Niklas Holsti
2024-02-16 23:45 ` Jeffrey R.Carter
2024-02-17 6:04 ` Randy Brukardt [this message]
2024-02-17 6:11 ` Jeffrey R.Carter
2024-02-18 9:48 ` Simon Wright
2024-02-18 9:59 ` Simon Wright
2024-02-18 11:48 ` Jeffrey R.Carter
2024-02-18 14:33 ` Simon Wright
2024-03-07 14:54 ` Simon Wright
2024-03-07 15:06 ` Jeffrey R.Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox