From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50,FREEMAIL_FROM, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 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: eternal-september.org!reader01.eternal-september.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: 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 Xref: reader01.eternal-september.org comp.lang.ada:64843 List-Id: Where is the right spot to apply an elaboration pragma to a library level s= ubprogram? GNAT (20210519-103) complains that in the below code C cannot w= ith subprogram A.B because it's not Pure, but it certainly appears to be, a= nd no amount of shuffling around the pragma in B seems to placate it. Play= ing 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; =20 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;