comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not>
Subject: Re: GNAT or Language Problems?
Date: Sat, 17 Jun 2023 22:49:46 +0200	[thread overview]
Message-ID: <u6l69a$17vn2$1@dont-email.me> (raw)
In-Reply-To: <0001HW.2A3E29DC00595EA070000B60138F@news.individual.net>

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

  reply	other threads:[~2023-06-17 20:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 16:36 GNAT or Language Problems? Jeffrey R.Carter
2023-06-17  7:28 ` Randy Brukardt
2023-06-17  9:21   ` Jeffrey R.Carter
2023-06-17 17:50     ` Bill Findlay
2023-06-17 20:49       ` Jeffrey R.Carter [this message]
2023-06-22  9:51     ` Randy Brukardt
2023-06-22 12:56       ` Jeffrey R.Carter
2023-06-23  9:55         ` Randy Brukardt
2023-06-24 12:23           ` Jeffrey R.Carter
2023-06-26 21:42             ` Randy Brukardt
2023-06-27 10:16               ` 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