help / color / mirror / Atom feed
* elab pragma placement
@ 2023-01-21 23:43 Simon Belmont
  2023-01-22  8:15 ` Luke A. Guest
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Belmont @ 2023-01-21 23:43 UTC (permalink / raw)

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?



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?
end A.B;

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-01-22 23:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-21 23:43 elab pragma placement Simon Belmont
2023-01-22  8:15 ` Luke A. Guest
2023-01-22  9:55   ` AdaMagica
2023-01-22 23:14     ` Rod Kay
2023-01-22 23:18       ` Rod Kay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox