Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Love makes the world go 'round, with a little help from intrinsic angular momentum.


devel / comp.lang.ada / Re: GNAT or Language Problems?

SubjectAuthor
* GNAT or Language Problems?Jeffrey R.Carter
`* Re: GNAT or Language Problems?Randy Brukardt
 `* Re: GNAT or Language Problems?Jeffrey R.Carter
  +* Re: GNAT or Language Problems?Bill Findlay
  |`- Re: GNAT or Language Problems?Jeffrey R.Carter
  `* Re: GNAT or Language Problems?Randy Brukardt
   `* Re: GNAT or Language Problems?Jeffrey R.Carter
    `* Re: GNAT or Language Problems?Randy Brukardt
     `* Re: GNAT or Language Problems?Jeffrey R.Carter
      `* Re: GNAT or Language Problems?Randy Brukardt
       `- Re: GNAT or Language Problems?Jeffrey R.Carter

1
GNAT or Language Problems?

<u558m9$1ub3o$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9678&group=comp.lang.ada#9678

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spam.jrcarter.not@spam.acm.org.not (Jeffrey R.Carter)
Newsgroups: comp.lang.ada
Subject: GNAT or Language Problems?
Date: Tue, 30 May 2023 18:36:25 +0200
Organization: A noiseless patient Spider
Lines: 139
Message-ID: <u558m9$1ub3o$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 30 May 2023 16:36:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="882d8a395c9cb0cfcf17b8727bb7e01b";
logging-data="2043000"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+QbgM+GY+GFJemfyLBnjZhmH56TflEGVc="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:8EdUyXfRp4ChhiNYqV7brfCzFwM=
Content-Language: en-US
 by: Jeffrey R.Carter - Tue, 30 May 2023 16:36 UTC

Here are a couple of things that recent versions of GNAT reject, and I suspect
that these are GNAT errors, but would appreciate input from language lawyers to
be sure. If they're not GNAT errors, then they seem like things that make Ada
less easy to use than I'd like.

The first is gcc bug 108157
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108157). GNAT.Sockets has

package GNAT.Sockets is
...
type Selector_Type is limited private;
...
procedure Connect_Socket
(Socket : Socket_Type;
Server : Sock_Addr_Type;
Timeout : Selector_Duration;
Selector : access Selector_Type := null;
Status : out Selector_Status);
-- Connect Socket to the given Server address using Connect_Socket, waiting
-- no longer than the given timeout duration. Status is set to indicate
-- whether the operation completed successfully, timed out, or was aborted.
-- If Selector is not null, the designated selector is used to wait for the
-- socket to become available, else a private selector object is created
-- by this procedure and destroyed before it returns. If Timeout is 0.0,
-- no attempt is made to detect whether the connection has succeeded; it
-- is up to the user to determine this using Check_Selector later on.
...
private
...
type Selector_Type (Is_Null : Boolean := False) is limited record
case Is_Null is
when True =>
null;

when False =>
R_Sig_Socket : Socket_Type := No_Socket;
W_Sig_Socket : Socket_Type := No_Socket;
-- Signalling sockets used to abort a select operation
end case;
end record;
...
end GNAT.Sockets;

Kazakov's GNAT.Sockets.Server had (since modified to work with recent versions
of GNAT)

package GNAT.Sockets.Server is
...
type Connections_Server is tagged limited private;
...
private
...
procedure Do_Connect
(Listener : in out Connections_Server'Class;
Client : in out Connection_Ptr);
...
type Connections_Server is tagged limited record
-- limited because Selector_Type is limited
Selector : aliased Selector_Type;
end record;
...
end GNAT.Sockets.Server;

and

package body GNAT.Sockets.Server is
...
procedure Do_Connect
(Listener : in out Connections_Server'Class;
Client : in out Connection_Ptr)
is
Status : Selector_Status;
begin
Connect_Socket
(Socket => Client.Socket,
Server => Client.Client_Address,
Timeout => 0.0,
Selector => Listener.Selector'Unchecked_Access,
Status => Status);
end Do_Connect;
...
end GNAT.Sockets.Server;

Beginning with GNAT 12, the parameter association

Selector => Listener.Selector'Unchecked_Access,

gives the error

object subtype must statically match designated subtype

The FSF GNAT maintainers have decided not to change this, citing

-- Ada 2005 (AI-363): Require static matching when designated
-- type has discriminants and a constrained partial view, since
-- in general objects of such types are mutable, so we can't
-- allow the access value to designate a constrained object
-- (because access values must be assumed to designate mutable
-- objects when designated type does not impose a constraint).

I think that those who use anonymous access types get what they deserve, but had
the parameter been mode "in out", there would be no problem. I think that
access parameters should work the same as "in out" parameters as much as possible.

So, GNAT or Ada problem, or is this a reasonable restriction?

The other instance is in PragmARC.B_Strings (https://github.com/jrcarter/PragmARC):

package PragmARC.B_Strings is
type B_String (Max_Length : Positive := 1024) is tagged limited private;
-- Default initial value is Null_B_String

Null_B_String : constant B_String; -- A string of zero characters
...
private -- PragmARC.B_Strings
type B_String (Max_Length : Positive := 1024) 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 PragmARC.B_Strings;

Beginning with GNAT 13, an error on the full declaration of the constant says
that its subtype does not statically match that of the deferred declaration.
A workaround is to explicitly declare the discriminant value on both
declarations. Probably making the full declaration be (others => <>) would also
work.

I don't see this in ARM 7.4; only constants of an anonymous access type have to
statically match. So this is probably a compiler error, but I thought I would
see what the experts think.

--
Jeff Carter
"Ada is a management tool. It selects for software
engineers and encourages the hackers to quit."
Robert C. Leif
204

Re: GNAT or Language Problems?

<u6jnbi$15r2k$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9723&group=comp.lang.ada#9723

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: randy@rrsoftware.com (Randy Brukardt)
Newsgroups: comp.lang.ada
Subject: Re: GNAT or Language Problems?
Date: Sat, 17 Jun 2023 02:28:58 -0500
Organization: A noiseless patient Spider
Lines: 172
Message-ID: <u6jnbi$15r2k$1@dont-email.me>
References: <u558m9$1ub3o$1@dont-email.me>
Injection-Date: Sat, 17 Jun 2023 07:28:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e397dc105e734c45be259b9319dda610";
logging-data="1240148"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+JblkGhLgHac1+eosFDBWSR0mtUOin22g="
Cancel-Lock: sha1:fkcvfCqa7RytK0Pcdi7dGOzKVho=
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-RFC2646: Format=Flowed; Response
X-Priority: 3
X-MSMail-Priority: Normal
 by: Randy Brukardt - Sat, 17 Jun 2023 07:28 UTC

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.

It's possible that GNAT did something too strong when fixing this problem,
as well.

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...)

Randy.

"Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not> wrote in message
news:u558m9$1ub3o$1@dont-email.me...
> Here are a couple of things that recent versions of GNAT reject, and I
> suspect that these are GNAT errors, but would appreciate input from
> language lawyers to be sure. If they're not GNAT errors, then they seem
> like things that make Ada less easy to use than I'd like.
>
> The first is gcc bug 108157
> (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108157). GNAT.Sockets has
>
> package GNAT.Sockets is
> ...
> type Selector_Type is limited private;
> ...
> procedure Connect_Socket
> (Socket : Socket_Type;
> Server : Sock_Addr_Type;
> Timeout : Selector_Duration;
> Selector : access Selector_Type := null;
> Status : out Selector_Status);
> -- Connect Socket to the given Server address using Connect_Socket,
> waiting
> -- no longer than the given timeout duration. Status is set to
> indicate
> -- whether the operation completed successfully, timed out, or was
> aborted.
> -- If Selector is not null, the designated selector is used to wait
> for the
> -- socket to become available, else a private selector object is
> created
> -- by this procedure and destroyed before it returns. If Timeout is
> 0.0,
> -- no attempt is made to detect whether the connection has succeeded;
> it
> -- is up to the user to determine this using Check_Selector later on.
> ...
> private
> ...
> type Selector_Type (Is_Null : Boolean := False) is limited record
> case Is_Null is
> when True =>
> null;
>
> when False =>
> R_Sig_Socket : Socket_Type := No_Socket;
> W_Sig_Socket : Socket_Type := No_Socket;
> -- Signalling sockets used to abort a select operation
> end case;
> end record;
> ...
> end GNAT.Sockets;
>
> Kazakov's GNAT.Sockets.Server had (since modified to work with recent
> versions of GNAT)
>
> package GNAT.Sockets.Server is
> ...
> type Connections_Server is tagged limited private;
> ...
> private
> ...
> procedure Do_Connect
> (Listener : in out Connections_Server'Class;
> Client : in out Connection_Ptr);
> ...
> type Connections_Server is tagged limited record
> -- limited because Selector_Type is limited
> Selector : aliased Selector_Type;
> end record;
> ...
> end GNAT.Sockets.Server;
>
> and
>
> package body GNAT.Sockets.Server is
> ...
> procedure Do_Connect
> (Listener : in out Connections_Server'Class;
> Client : in out Connection_Ptr)
> is
> Status : Selector_Status;
> begin
> Connect_Socket
> (Socket => Client.Socket,
> Server => Client.Client_Address,
> Timeout => 0.0,
> Selector => Listener.Selector'Unchecked_Access,
> Status => Status);
> end Do_Connect;
> ...
> end GNAT.Sockets.Server;
>
> Beginning with GNAT 12, the parameter association
>
> Selector => Listener.Selector'Unchecked_Access,
>
> gives the error
>
> object subtype must statically match designated subtype
>
> The FSF GNAT maintainers have decided not to change this, citing
>
> -- Ada 2005 (AI-363): Require static matching when designated
> -- type has discriminants and a constrained partial view, since
> -- in general objects of such types are mutable, so we can't
> -- allow the access value to designate a constrained object
> -- (because access values must be assumed to designate mutable
> -- objects when designated type does not impose a constraint).
>
> I think that those who use anonymous access types get what they deserve,
> but had the parameter been mode "in out", there would be no problem. I
> think that access parameters should work the same as "in out" parameters
> as much as possible.
>
> So, GNAT or Ada problem, or is this a reasonable restriction?
>
> The other instance is in PragmARC.B_Strings
> (https://github.com/jrcarter/PragmARC):
>
> package PragmARC.B_Strings is
> type B_String (Max_Length : Positive := 1024) is tagged limited
> private;
> -- Default initial value is Null_B_String
>
> Null_B_String : constant B_String; -- A string of zero characters
> ...
> private -- PragmARC.B_Strings
> type B_String (Max_Length : Positive := 1024) 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 PragmARC.B_Strings;
>
> Beginning with GNAT 13, an error on the full declaration of the constant
> says that its subtype does not statically match that of the deferred
> declaration.
> A workaround is to explicitly declare the discriminant value on both
> declarations. Probably making the full declaration be (others => <>) would
> also work.
>
> I don't see this in ARM 7.4; only constants of an anonymous access type
> have to statically match. So this is probably a compiler error, but I
> thought I would see what the experts think.
>
> --
> Jeff Carter
> "Ada is a management tool. It selects for software
> engineers and encourages the hackers to quit."
> Robert C. Leif
> 204

Re: GNAT or Language Problems?

<u6jtue$16d9e$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9725&group=comp.lang.ada#9725

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spam.jrcarter.not@spam.acm.org.not (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
Lines: 49
Message-ID: <u6jtue$16d9e$1@dont-email.me>
References: <u558m9$1ub3o$1@dont-email.me> <u6jnbi$15r2k$1@dont-email.me>
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: <u6jnbi$15r2k$1@dont-email.me>
Content-Language: en-US
 by: Jeffrey R.Carter - Sat, 17 Jun 2023 09:21 UTC

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

Re: GNAT or Language Problems?

<0001HW.2A3E29DC00595EA070000B60138F@news.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9726&group=comp.lang.ada#9726

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: findlaybill@blueyonder.co.uk (Bill Findlay)
Newsgroups: comp.lang.ada
Subject: Re: GNAT or Language Problems?
Date: Sat, 17 Jun 2023 18:50:20 +0100
Organization: none
Lines: 51
Message-ID: <0001HW.2A3E29DC00595EA070000B60138F@news.individual.net>
References: <u558m9$1ub3o$1@dont-email.me> <u6jnbi$15r2k$1@dont-email.me> <u6jtue$16d9e$1@dont-email.me>
Reply-To: findlaybill@blueyonder.co.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: individual.net reKulqj+mHEIO5DPn2eXxgjjy8ZxBp5eYgVB4vKXy0VDOBeJvq
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:8nyGPEvtKG2yrNvOKwodL2FDzVM=
User-Agent: Hogwasher/5.24
 by: Bill Findlay - Sat, 17 Jun 2023 17:50 UTC

On 17 Jun 2023, Jeffrey R.Carter wrote
(in article <u6jtue$16d9e$1@dont-email.me>):

> 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:

I get, in macOS, with:

> gcc -c -gnatl12 b_strings_prob.ads

and the same with with:

> gnatmake -gnatl2022 b_strings_prob.ads

> GNAT 12.2.0
> Copyright 1992-2022, Free Software Foundation, Inc.

> Compiling: b_strings_prob.ads
> Source file time stamp: 2023-06-17 17:38:32
> Compiled at: 2023-06-17 18:38:38

> 1. package B_Strings_Prob is
> 2. type B_String (Max_Length : Positive := 1_000) is taggedlimited private;
> 3.
> 4. Null_B_String : constant B_String; -- A string of zero characters
> 5. private -- B_Strings_Prob
> 6. type B_String (Max_Length : Positive := 1_000) is tagged limited record
> 7. Len : Natural := 0;
> 8. Value : String (1 .. Max_Length) := (1 .. Max_Length => ' ');
> 9. end record;
> 10.
> 11. Null_B_String : constant B_String := (Max_Length => 1, others => <>);
> 12. end B_Strings_Prob;
> 13.

> 13 lines: No errors

Bug in GNAT 13??

--
Bill Findlay

Re: GNAT or Language Problems?

<u6l69a$17vn2$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9727&group=comp.lang.ada#9727

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spam.jrcarter.not@spam.acm.org.not (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
Lines: 38
Message-ID: <u6l69a$17vn2$1@dont-email.me>
References: <u558m9$1ub3o$1@dont-email.me> <u6jnbi$15r2k$1@dont-email.me>
<u6jtue$16d9e$1@dont-email.me>
<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
 by: Jeffrey R.Carter - Sat, 17 Jun 2023 20:49 UTC

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

Re: GNAT or Language Problems?

<u715id$38rs5$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9740&group=comp.lang.ada#9740

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: randy@rrsoftware.com (Randy Brukardt)
Newsgroups: comp.lang.ada
Subject: Re: GNAT or Language Problems?
Date: Thu, 22 Jun 2023 04:51:17 -0500
Organization: A noiseless patient Spider
Lines: 78
Message-ID: <u715id$38rs5$1@dont-email.me>
References: <u558m9$1ub3o$1@dont-email.me> <u6jnbi$15r2k$1@dont-email.me> <u6jtue$16d9e$1@dont-email.me>
Injection-Date: Thu, 22 Jun 2023 09:51:09 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c6087f7335e2480a72f4c4a2827b41ef";
logging-data="3436421"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+NewLqrAiSgVbji7FWrnzToNMHEHo9844="
Cancel-Lock: sha1:LRv1pGO8mSlRQIl24B7V0eCLtsY=
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246
X-MSMail-Priority: Normal
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
 by: Randy Brukardt - Thu, 22 Jun 2023 09:51 UTC

You missed my point: The requirement that the subtypes are statically
compatible was newly added. That applies to *all* subtypes, not just those
with predicates. The reason the requirement was added had to do with
predicates, but it might affect some marginal cases beyond that. It's a
weaker requirement than static matching, but stronger than no requirement at
all.

As I said the other day, you need to check if 4.9.1 allows or disallows your
example (that's where the definition of static compatibility is found). If
it allows it, then it's a compiler bug, if it doesn't allow it, it's an
incompatibility with a language fix and you need to find a different way to
do whatever it is you are doing. I don't have the energy tonight to go
through that exercise myself (I apparently brought back a bug from Lisbon,
and have spent much of the last several days in bed - but for some reason I
seem to only be able to sleep during the day. Really louses up life...).

Randy.

"Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not> wrote in message
news:u6jtue$16d9e$1@dont-email.me...
> 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
>

Re: GNAT or Language Problems?

<u71gea$38ekv$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9741&group=comp.lang.ada#9741

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spam.jrcarter.not@spam.acm.org.not (Jeffrey R.Carter)
Newsgroups: comp.lang.ada
Subject: Re: GNAT or Language Problems?
Date: Thu, 22 Jun 2023 14:56:42 +0200
Organization: A noiseless patient Spider
Lines: 100
Message-ID: <u71gea$38ekv$1@dont-email.me>
References: <u558m9$1ub3o$1@dont-email.me> <u6jnbi$15r2k$1@dont-email.me>
<u6jtue$16d9e$1@dont-email.me> <u715id$38rs5$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 22 Jun 2023 12:56:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9b320abd6a04c902207fcf7efd7448a0";
logging-data="3422879"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+x/ZCyTf4VtrCMaNLCaFqRkBEdKGCeS84="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:5A8iuxaidDPJLQsvKWncTjAWsSg=
In-Reply-To: <u715id$38rs5$1@dont-email.me>
Content-Language: en-US
 by: Jeffrey R.Carter - Thu, 22 Jun 2023 12:56 UTC

On 2023-06-22 11:51, Randy Brukardt wrote:
> You missed my point: The requirement that the subtypes are statically
> compatible was newly added. That applies to *all* subtypes, not just those
> with predicates. The reason the requirement was added had to do with
> predicates, but it might affect some marginal cases beyond that. It's a
> weaker requirement than static matching, but stronger than no requirement at
> all.
>
> As I said the other day, you need to check if 4.9.1 allows or disallows your
> example (that's where the definition of static compatibility is found). If
> it allows it, then it's a compiler bug, if it doesn't allow it, it's an
> incompatibility with a language fix and you need to find a different way to
> do whatever it is you are doing.

Sorry, but I think you're wrong. The problem isn't static compatibility; it's
static matching. The error msg says the subtypes must statically match, and the
wording in 7.4(6/3) for deferred constants (which this is) refers to statically
matching constraints. So static compatibility doesn't seem to be the issue.

> I don't have the energy tonight to go
> through that exercise myself (I apparently brought back a bug from Lisbon,
> and have spent much of the last several days in bed - but for some reason I
> seem to only be able to sleep during the day. Really louses up life...).

Sorry to hear that. Hope you feel better soon.

> "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not> wrote in message
> news:u6jtue$16d9e$1@dont-email.me...
>> 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
>>
>
>

--
Jeff Carter
"[I]t is easy to use [Ada] just like any other
language: using only predefined types, using
packages just for separate compilation (without
any consideration for information hiding),
ignoring generics altogether, etc. I have seen
projects doing this; they didn't get much
gain from using Ada, and spent a lot of time
fighting the compiler."
Jean-Pierre Rosen
165

Re: GNAT or Language Problems?

<u73q5r$3mmom$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9742&group=comp.lang.ada#9742

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: randy@rrsoftware.com (Randy Brukardt)
Newsgroups: comp.lang.ada
Subject: Re: GNAT or Language Problems?
Date: Fri, 23 Jun 2023 04:55:15 -0500
Organization: A noiseless patient Spider
Lines: 81
Message-ID: <u73q5r$3mmom$1@dont-email.me>
References: <u558m9$1ub3o$1@dont-email.me> <u6jnbi$15r2k$1@dont-email.me> <u6jtue$16d9e$1@dont-email.me> <u715id$38rs5$1@dont-email.me> <u71gea$38ekv$1@dont-email.me>
Injection-Date: Fri, 23 Jun 2023 09:55:07 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="838ba70884aabc9860d2ae2ba2a6d444";
logging-data="3889942"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19n7Stmblznw3IZDTrWMJ3Jn34JtNjAagg="
Cancel-Lock: sha1:plu+Bqs1V5ax4IwZri5ZfBFVbMM=
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-Priority: 3
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246
 by: Randy Brukardt - Fri, 23 Jun 2023 09:55 UTC

"Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not> wrote in message
news:u71gea$38ekv$1@dont-email.me...
> On 2023-06-22 11:51, Randy Brukardt wrote:
>> You missed my point: The requirement that the subtypes are statically
>> compatible was newly added. That applies to *all* subtypes, not just
>> those
>> with predicates. The reason the requirement was added had to do with
>> predicates, but it might affect some marginal cases beyond that. It's a
>> weaker requirement than static matching, but stronger than no requirement
>> at
>> all.
>>
>> As I said the other day, you need to check if 4.9.1 allows or disallows
>> your
>> example (that's where the definition of static compatibility is found).
>> If
>> it allows it, then it's a compiler bug, if it doesn't allow it, it's an
>> incompatibility with a language fix and you need to find a different way
>> to
>> do whatever it is you are doing.
>
> Sorry, but I think you're wrong. The problem isn't static compatibility;
> it's static matching. The error msg says the subtypes must statically
> match, and the wording in 7.4(6/3) for deferred constants (which this is)
> refers to statically matching constraints. So static compatibility doesn't
> seem to be the issue.

Sigh. :Let's start over. My theory was that the problem came from an attempt
by AdaCore to implement AI22-0041-1, a post Ada-2022 binding interpretation.
That AI adds a static compatibility requirement to 7.4(6/3) (making it
7.4(6/6)). (It of course could just be a bug, too, but AI22-0041-1 seems
like the only sane reason to be changing the matching code in a working
compiler that passes the ACATS.)

There is *no* version of the RM currently that includes the wording from
post-Ada 2022 AIs (because of we had to wait for ISO to publish the thing
first). You can only find that in the >50 approved AIs.

To save you the effort of looking up AI22-0041-1, here is the entire wording
section from that AI:

Replace 7.4(6/3) :

a.. 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. [Redundant: 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;]
with:

a.. If the deferred constant declaration includes a subtype_indication
that defines a subtype S1, then the subtype_indication in the full
declaration shall define a subtype S2 that is statically compatible with S1
(see 4.9.1). If S1 is a constrained subtype, the constraint defined by S2
shall statically match the constraint defined by S1. [Redundant: If the
subtype S1 of the deferred constant is unconstrained, then the full
declaration is still allowed to impose a constraint.]
Modify 7.4(7/2):

a.. If the deferred constant declaration contains the reserved word
aliased, then the full declaration shall also{.}[;]
Delete 7.4(7.1/2) [now covered by static compatibility]:

a.. If the subtype of the deferred constant declaration excludes null,
then the subtype of the full declaration shall also exclude null.
Note that this adds a requirement for static compatibility of the subtypes
for *all* deferred constant declarations. The AI also says that the separate
static matching requirement is unnecessary; it was left alone to avoid
making work for implementers in unlikely cases (it's weaker than static
matching for scalar types, but deferred constants are rarely scalar).

Note that static compatibility requires static matching in some cases, so it
could make sense to have the message say something about the types being
required to match. (The distinction between "static compatibility" and
"static matching" is lost on most people.)

Randy.

Re: GNAT or Language Problems?

<u76n8o$3873$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9744&group=comp.lang.ada#9744

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spam.jrcarter.not@spam.acm.org.not (Jeffrey R.Carter)
Newsgroups: comp.lang.ada
Subject: Re: GNAT or Language Problems?
Date: Sat, 24 Jun 2023 14:23:51 +0200
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <u76n8o$3873$1@dont-email.me>
References: <u558m9$1ub3o$1@dont-email.me> <u6jnbi$15r2k$1@dont-email.me>
<u6jtue$16d9e$1@dont-email.me> <u715id$38rs5$1@dont-email.me>
<u71gea$38ekv$1@dont-email.me> <u73q5r$3mmom$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 24 Jun 2023 12:23:52 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c876e409551b80fd0e2efd887d8b4950";
logging-data="106723"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+tfQRNxj14FTVRHLBwFDsGt2WcEn6kK80="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:pN6Q24n5l2Eba7Od1EexIPT6c3I=
In-Reply-To: <u73q5r$3mmom$1@dont-email.me>
Content-Language: en-US
 by: Jeffrey R.Carter - Sat, 24 Jun 2023 12:23 UTC

On 2023-06-23 11:55, Randy Brukardt wrote:
>
> Sigh. :Let's start over. My theory was that the problem came from an attempt
> by AdaCore to implement AI22-0041-1, a post Ada-2022 binding interpretation.
> That AI adds a static compatibility requirement to 7.4(6/3) (making it
> 7.4(6/6)). (It of course could just be a bug, too, but AI22-0041-1 seems
> like the only sane reason to be changing the matching code in a working
> compiler that passes the ACATS.)
>
> There is *no* version of the RM currently that includes the wording from
> post-Ada 2022 AIs (because of we had to wait for ISO to publish the thing
> first). You can only find that in the >50 approved AIs.

Thanks for this clarification. I didn't realize I would have to look at the AI
itself. I'm using -gnat12, in hopes that the Ada-12 rules would be applied, but
that doesn't seem to work.

[New version of 7.4(6):]

> a.. If the deferred constant declaration includes a subtype_indication
> that defines a subtype S1, then the subtype_indication in the full
> declaration shall define a subtype S2 that is statically compatible with S1
> (see 4.9.1). If S1 is a constrained subtype, the constraint defined by S2
> shall statically match the constraint defined by S1. [Redundant: If the
> subtype S1 of the deferred constant is unconstrained, then the full
> declaration is still allowed to impose a constraint.]

As my case doesn't involve the concepts involved in the other PPs, aliased and
null exclusion, I presume that this PP applies. The essential parts of the code are

type B_String (Max_Length : Positive := 1_000) is tagged limited private;
Null_B_String : constant B_String;
...
Null_B_String : constant B_String := (Max_Length => 1, others => <>);

I would think that the subtype indications in the two, being identical, would be
statically compatible. But my understanding of this may be wrong.

I'm not sure whether the deferred declaration has a constrained subtype, which
would result in the constraint from the initialization expression of the full
declaration not matching. But that rule has existed since Ada 95.

I think it would be a mistake for the language to require explicit discriminant
associations for this case.

So I'm still not able to tell if this is a compiler error or intended by the
language.

--
Jeff Carter
"Insufficient laughter--that's grounds for divorce."
Play It Again, Sam
126

Re: GNAT or Language Problems?

<u7d0om$137jt$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9755&group=comp.lang.ada#9755

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: randy@rrsoftware.com (Randy Brukardt)
Newsgroups: comp.lang.ada
Subject: Re: GNAT or Language Problems?
Date: Mon, 26 Jun 2023 16:42:55 -0500
Organization: A noiseless patient Spider
Lines: 71
Message-ID: <u7d0om$137jt$1@dont-email.me>
References: <u558m9$1ub3o$1@dont-email.me> <u6jnbi$15r2k$1@dont-email.me> <u6jtue$16d9e$1@dont-email.me> <u715id$38rs5$1@dont-email.me> <u71gea$38ekv$1@dont-email.me> <u73q5r$3mmom$1@dont-email.me> <u76n8o$3873$1@dont-email.me>
Injection-Date: Mon, 26 Jun 2023 21:42:46 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6c7462d9aafb8fe3924bdd4a893577ba";
logging-data="1154685"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+kDoZFbT69tQG99fx/nrdM5MZ9a0gvt98="
Cancel-Lock: sha1:Ry6GLs1p9wrE6W+UDiDIxFEEW2U=
X-RFC2646: Format=Flowed; Response
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246
X-MSMail-Priority: Normal
 by: Randy Brukardt - Mon, 26 Jun 2023 21:42 UTC

"Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not> wrote in message
news:u76n8o$3873$1@dont-email.me...
> On 2023-06-23 11:55, Randy Brukardt wrote:
>>
>> Sigh. :Let's start over. My theory was that the problem came from an
>> attempt
>> by AdaCore to implement AI22-0041-1, a post Ada-2022 binding
>> interpretation.
>> That AI adds a static compatibility requirement to 7.4(6/3) (making it
>> 7.4(6/6)). (It of course could just be a bug, too, but AI22-0041-1 seems
>> like the only sane reason to be changing the matching code in a working
>> compiler that passes the ACATS.)
>>
>> There is *no* version of the RM currently that includes the wording from
>> post-Ada 2022 AIs (because of we had to wait for ISO to publish the thing
>> first). You can only find that in the >50 approved AIs.
>
> Thanks for this clarification. I didn't realize I would have to look at
> the AI itself. I'm using -gnat12, in hopes that the Ada-12 rules would be
> applied, but that doesn't seem to work.
>
> [New version of 7.4(6):]
>
>> a.. If the deferred constant declaration includes a subtype_indication
>> that defines a subtype S1, then the subtype_indication in the full
>> declaration shall define a subtype S2 that is statically compatible with
>> S1
>> (see 4.9.1). If S1 is a constrained subtype, the constraint defined by S2
>> shall statically match the constraint defined by S1. [Redundant: If the
>> subtype S1 of the deferred constant is unconstrained, then the full
>> declaration is still allowed to impose a constraint.]
>
> As my case doesn't involve the concepts involved in the other PPs, aliased
> and null exclusion, I presume that this PP applies. The essential parts of
> the code are
>
> type B_String (Max_Length : Positive := 1_000) is tagged limited
> private;
> Null_B_String : constant B_String;
> ...
> Null_B_String : constant B_String := (Max_Length => 1, others => <>);
>
> I would think that the subtype indications in the two, being identical,
> would be statically compatible. But my understanding of this may be wrong.
>
> I'm not sure whether the deferred declaration has a constrained subtype,
> which would result in the constraint from the initialization expression of
> the full declaration not matching. But that rule has existed since Ada 95.
>
> I think it would be a mistake for the language to require explicit
> discriminant associations for this case.
>
> So I'm still not able to tell if this is a compiler error or intended by
> the language.

A subtype is always supposed to statically match itself (even though that
isn't clear from them RM wording).

B_String is an unconstrained type, which technically has a "null constraint"
(see 3.2(7/2), rather unfortuate terminology, IMHO(. These always statically
match, so they're always statically compatible as well.

So this appears to be a compiler bug. It might be related to the relatively
new rule that Object_Size must match for static matching to work -- but that
only applies to non-default Object_Size values (and there are none of those
given here).

Randy.

Re: GNAT or Language Problems?

<u7ect4$1c3gs$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9756&group=comp.lang.ada#9756

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spam.jrcarter.not@spam.acm.org.not (Jeffrey R.Carter)
Newsgroups: comp.lang.ada
Subject: Re: GNAT or Language Problems?
Date: Tue, 27 Jun 2023 12:16:04 +0200
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <u7ect4$1c3gs$1@dont-email.me>
References: <u558m9$1ub3o$1@dont-email.me> <u6jnbi$15r2k$1@dont-email.me>
<u6jtue$16d9e$1@dont-email.me> <u715id$38rs5$1@dont-email.me>
<u71gea$38ekv$1@dont-email.me> <u73q5r$3mmom$1@dont-email.me>
<u76n8o$3873$1@dont-email.me> <u7d0om$137jt$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 27 Jun 2023 10:16:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b333252710fa1f073295e97d94cd7fcc";
logging-data="1445404"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19wfbPFvWIqlOus02cV/VKVS8bLM9tUBm4="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:9in3zie32sd6mIJ3qt7o35B5deU=
In-Reply-To: <u7d0om$137jt$1@dont-email.me>
Content-Language: en-US
 by: Jeffrey R.Carter - Tue, 27 Jun 2023 10:16 UTC

On 2023-06-26 23:42, Randy Brukardt wrote:
>
> B_String is an unconstrained type, which technically has a "null constraint"
> (see 3.2(7/2), rather unfortuate terminology, IMHO(. These always statically
> match, so they're always statically compatible as well.

It's also a limited type, so the discriminant can never be changed, which is why
I was unsure if the deferred constant was considered constrained.

> So this appears to be a compiler bug. It might be related to the relatively
> new rule that Object_Size must match for static matching to work -- but that
> only applies to non-default Object_Size values (and there are none of those
> given here).

Thanks for looking at this. I'll have to find out how to report an error in FSF
GNAT.

--
Jeff Carter
"It has been my great privilege, many years ago,
whilst traveling through the mountains of Paraguay,
to find the Yack'Wee Indians drinking the juice of
the cacti."
The Old Fashioned Way
152

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor