Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Delta: A real man lands where he wants to. -- David Letterman


devel / comp.lang.ada / elab pragma placement

SubjectAuthor
* elab pragma placementSimon Belmont
`* Re: elab pragma placementLuke A. Guest
 `* Re: elab pragma placementAdaMagica
  `* Re: elab pragma placementRod Kay
   `- Re: elab pragma placementRod Kay

1
elab pragma placement

<7f9d3951-fbf3-469a-ae4f-a74de26771b1n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a37:c241:0:b0:6fa:8b0b:10c9 with SMTP id j1-20020a37c241000000b006fa8b0b10c9mr1166215qkm.732.1674344612617;
Sat, 21 Jan 2023 15:43:32 -0800 (PST)
X-Received: by 2002:a05:6871:a6a2:b0:15e:ba0e:347f with SMTP id
wh34-20020a056871a6a200b0015eba0e347fmr1681261oab.129.1674344612307; Sat, 21
Jan 2023 15:43:32 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Sat, 21 Jan 2023 15:43:32 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=159.250.202.227; posting-account=ShYTIAoAAABytvcS76ZrG9GdaV-nXYKy
NNTP-Posting-Host: 159.250.202.227
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7f9d3951-fbf3-469a-ae4f-a74de26771b1n@googlegroups.com>
Subject: elab pragma placement
From: sbelmont700@gmail.com (Simon Belmont)
Injection-Date: Sat, 21 Jan 2023 23:43:32 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1747
 by: Simon Belmont - Sat, 21 Jan 2023 23:43 UTC

Where is the right spot to apply an elaboration pragma to a library level subprogram? GNAT (20210519-103) complains that in the below code C cannot with subprogram A.B because it's not Pure, but it certainly appears to be, and no amount of shuffling around the pragma in B seems to placate it. Playing with the declaration of T seems to change the behavior; is GNAT is just misreporting a different error?

Thanks

-sb

package A is
pragma Pure;
type T is limited null record;
end A;

procedure A.B (x : T) is
pragma Pure; -- is this the right spot?
begin
null;
end A.B;

with A.B; -- error: cannot depend on "B" (wrong categorization)
package C is
pragma Pure;
end C;

Re: elab pragma placement

<tqirfc$1vu2$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!Lx7EM+81f32E0bqku+QpCA.user.46.165.242.75.POSTED!not-for-mail
From: laguest@archeia.com (Luke A. Guest)
Newsgroups: comp.lang.ada
Subject: Re: elab pragma placement
Date: Sun, 22 Jan 2023 08:15:18 +0000
Organization: Aioe.org NNTP Server
Message-ID: <tqirfc$1vu2$1@gioia.aioe.org>
References: <7f9d3951-fbf3-469a-ae4f-a74de26771b1n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="65474"; posting-host="Lx7EM+81f32E0bqku+QpCA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.6.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: Luke A. Guest - Sun, 22 Jan 2023 08:15 UTC

On 21/01/2023 23:43, Simon Belmont wrote:
> Where is the right spot to apply an elaboration pragma to a library level subprogram? GNAT (20210519-103) complains that in the below code C cannot with subprogram A.B because it's not Pure, but it certainly appears to be,

To be pure it can contain only things that can be pre-elaborated, iirc,
so only types, no functions.

> and no amount of shuffling around the pragma in B seems to placate it. Playing with the declaration of T seems to change the behavior; is GNAT is just misreporting a different error?
>
> Thanks
>
> -sb
>
>
> package A is
> pragma Pure;
> type T is limited null record;
> end A;
>
> procedure A.B (x : T) is
> pragma Pure; -- is this the right spot?
> begin
> null;
> end A.B;
>
> with A.B; -- error: cannot depend on "B" (wrong categorization)
> package C is
> pragma Pure;
> end C;

Re: elab pragma placement

<4db688df-4ada-4eaf-8c49-ac8ab1956b91n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:208e:b0:6ff:9375:34bc with SMTP id e14-20020a05620a208e00b006ff937534bcmr1180775qka.627.1674381308418;
Sun, 22 Jan 2023 01:55:08 -0800 (PST)
X-Received: by 2002:a05:6870:88d:b0:148:16a3:f43c with SMTP id
fx13-20020a056870088d00b0014816a3f43cmr1388304oab.272.1674381308007; Sun, 22
Jan 2023 01:55:08 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Sun, 22 Jan 2023 01:55:07 -0800 (PST)
In-Reply-To: <tqirfc$1vu2$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=18.197.116.227; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf
NNTP-Posting-Host: 18.197.116.227
References: <7f9d3951-fbf3-469a-ae4f-a74de26771b1n@googlegroups.com> <tqirfc$1vu2$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4db688df-4ada-4eaf-8c49-ac8ab1956b91n@googlegroups.com>
Subject: Re: elab pragma placement
From: christ-usch.grein@t-online.de (AdaMagica)
Injection-Date: Sun, 22 Jan 2023 09:55:08 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1402
 by: AdaMagica - Sun, 22 Jan 2023 09:55 UTC

A subprogram is a program unit and may be declared pure. I do not see that A.B performs any of 10.2.1(15ff).

I tried
procedure A.B (x : T) with Pure;
which is accepted together with its body and still got the compiler complaint.

Looks like a compiler problem.

Re: elab pragma placement

<tqkfvl$39v71$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: rodakay5@gmail.com (Rod Kay)
Newsgroups: comp.lang.ada
Subject: Re: elab pragma placement
Date: Mon, 23 Jan 2023 10:14:18 +1100
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <tqkfvl$39v71$1@dont-email.me>
References: <7f9d3951-fbf3-469a-ae4f-a74de26771b1n@googlegroups.com>
<tqirfc$1vu2$1@gioia.aioe.org>
<4db688df-4ada-4eaf-8c49-ac8ab1956b91n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 22 Jan 2023 23:13:58 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="f2406f80d8a139156a3308bf3c4cc5d0";
logging-data="3472609"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+SPdgVrj53mRgqc224czjA93On+MZcYM0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.7.0
Cancel-Lock: sha1:BrGrUDA03MYmdqQkuC5cRmysWj8=
Content-Language: en-US
In-Reply-To: <4db688df-4ada-4eaf-8c49-ac8ab1956b91n@googlegroups.com>
 by: Rod Kay - Sun, 22 Jan 2023 23:14 UTC

On 22/1/23 20:55, AdaMagica wrote:
> A subprogram is a program unit and may be declared pure. I do not see that A.B performs any of 10.2.1(15ff).
>
> I tried
> procedure A.B (x : T) with Pure;
> which is accepted together with its body and still got the compiler complaint.
>
> Looks like a compiler problem.

If you are on linux, then you could set the stack size with

$ ulimit -s unlimited
$ launch_my_app

Regards.

Re: elab pragma placement

<tqkg72$39v71$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: rodakay5@gmail.com (Rod Kay)
Newsgroups: comp.lang.ada
Subject: Re: elab pragma placement
Date: Mon, 23 Jan 2023 10:18:14 +1100
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <tqkg72$39v71$2@dont-email.me>
References: <7f9d3951-fbf3-469a-ae4f-a74de26771b1n@googlegroups.com>
<tqirfc$1vu2$1@gioia.aioe.org>
<4db688df-4ada-4eaf-8c49-ac8ab1956b91n@googlegroups.com>
<tqkfvl$39v71$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 22 Jan 2023 23:17:55 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="f2406f80d8a139156a3308bf3c4cc5d0";
logging-data="3472609"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19c6tn1ZutqTE0mBfuGqkVcv9+ig0Yc9MM="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.7.0
Cancel-Lock: sha1:oMForKzGZRfz/56GB5Wqzpdom9Y=
In-Reply-To: <tqkfvl$39v71$1@dont-email.me>
Content-Language: en-US
 by: Rod Kay - Sun, 22 Jan 2023 23:18 UTC

On 23/1/23 10:14, Rod Kay wrote:
> On 22/1/23 20:55, AdaMagica wrote:
>> A subprogram is a program unit and may be declared pure. I do not see
>> that A.B performs any of 10.2.1(15ff).
>>
>> I tried
>> procedure A.B (x : T) with Pure;
>> which is accepted together with its body and still got the compiler
>> complaint.
>>
>> Looks like a compiler problem.
>
>    If you are on linux, then you could set the stack size with
>
>    $ ulimit -s unlimited
>    $ launch_my_app
>
>
>
> Regards.

Sorry, wrong thread :/ .


devel / comp.lang.ada / elab pragma placement

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor