From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,6651f3800ba2b6ac X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news4.google.com!feeder.news-service.com!feeder.news-service.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Aspect programming Date: Thu, 28 Jul 2011 12:38:37 -0700 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 28 Jul 2011 19:38:34 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="JqHjgPp5xM1RSLdgY0ShBA"; logging-data="17616"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ILSLJjI7BxLBpYCDCOz3f" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 In-Reply-To: Cancel-Lock: sha1:Jg/qZb6ARHajdgyZEQRJraakRu8= Xref: g2news2.google.com comp.lang.ada:21375 Date: 2011-07-28T12:38:37-07:00 List-Id: On 7/28/2011 11:13 AM, Adam Beneschan wrote: >However, I haven't researched > all the relevant language rules carefully, and there may be some rules > that affect when assertion policies apply to declarations (or Assert > pragmas) created by instantiation. OK, I just ran across 11.4.2(17), which says "The assertion policy that applies to a generic unit also applies to all its instances". 11.4.2 also talks about a default assertion policy that applies when there's no explicit Assertion_Policy that applies to a compilation unit; this policy is implementation-defined, and I don't know how GNAT defines it, and I don't feel like looking it up, but I assume that GNAT's default is that assertions aren't checked... is that right? I assume that "an assertion policy applying to its instances" means that this policy supersedes anything that might be in effect elsewhere in the compilation unit; although the RM doesn't say this explicitly, it looks like this is the intent, and I haven't yet found any corner cases where the RM doesn't provide a clear answer about what's supposed to happen. So I guess you can ignore the last paragraph of my previous post. -- Adam