From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Pure Aspect on Library-Level Function Date: Wed, 10 Feb 2021 20:53:06 -0600 Organization: JSA Research & Innovation Message-ID: References: <317ba71f-f049-4bbd-8da3-cc8dc1637eaan@googlegroups.com> Injection-Date: Thu, 11 Feb 2021 02:53:07 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="18163"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:61341 List-Id: I agree with Christoph. The very last Ada 202x AI (because it's the only one that I haven't finished yet) obsolesces all of the categorization pragmas, only defining the aspects in the core. So it will be crystal clear in the updated RM that the aspects apply to all compilation units (the pragmas having moved to Annex J). (All of the language-defined packages also have been changed to use aspects - that was a job I was working on today - I believe there will be only a single pragma left in the entire Ada library (a single "Elaborate_All", in Interfaces.Fortran). This probably is just an oversight in compiler O. BTW, these aspects are implemented in Janus/Ada (and have been for a while); if I'm reading the code right, they should should be allowed on any library unit. So Janus/Ada agrees with compiler G. Randy. "AdaMagica" wrote in message news:317ba71f-f049-4bbd-8da3-cc8dc1637eaan@googlegroups.com... > Hm, I worked thru the RM and think compiler O(bject Ada?) is incorrect. > But I'm not a language lawyer. > A subprogram ceclaration is a library unit. > 10.2.1(17) A pragma Pure is used to specify that a library unit is > declared pure, namely that the Pure aspect of the library unit is True > 6.1(2) subprogram_declaration ::= > [overriding_indicator] > subprogram_specification > [aspect_specification]; > Thus it seems the aspect can be defined via a pragma or via an aspect > specification.