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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.58.46.36 with SMTP id s4mr8463321vem.18.1382981470930; Mon, 28 Oct 2013 10:31:10 -0700 (PDT) X-Received: by 10.50.2.74 with SMTP id 10mr205029igs.15.1382981470340; Mon, 28 Oct 2013 10:31:10 -0700 (PDT) Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!o2no6300373qas.0!news-out.google.com!rn2ni128316pbc.1!nntp.google.com!o2no6300347qas.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 28 Oct 2013 10:31:09 -0700 (PDT) In-Reply-To: <526e8d35$0$9522$9b4e6d93@newsspool1.arcor-online.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=RxNzCgoAAACA5KmgtFQuaU-WaH7rjnAO NNTP-Posting-Host: 66.126.103.122 References: <4395468b-93d3-45f4-8bc0-91cd646ff1d9@googlegroups.com> <526e8d35$0$9522$9b4e6d93@newsspool1.arcor-online.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <617b0482-3cb4-4ea5-9600-5dafe982d15f@googlegroups.com> Subject: Re: Warning: accessibility check failure with GNAT GPL 2013 From: Adam Beneschan Injection-Date: Mon, 28 Oct 2013 17:31:10 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 3155 Xref: number.nntp.dca.giganews.com comp.lang.ada:183751 Date: 2013-10-28T10:31:09-07:00 List-Id: On Monday, October 28, 2013 9:13:41 AM UTC-7, Georg Bauhaus wrote: > On 28.10.13 16:49, Dmitry A. Kazakov wrote: >=20 > > Use a named access type instead. E.g. >=20 > > type Cyclic_Thread_Ptr is access all Cyclic_Thread: =20 > 2nd. And consider dropping "all" from the above type > declaration, if possible. In your example, all pointers > point to tasks of type Cyclic_Thread that were created > by an allocator, so "all" is not needed. (Because you > do not store the 'Access of some "non-heap" task object > in some pointer variable.) Although the example may not use any objects that aren't created by an allo= cator, the question is whether there's any possibility that a programmer *m= ight* want to use the access type to refer to aliased variables or other no= n-allocated objects later. If we know that, by the *nature* of the access = type and what it's supposed to represent, that having it refer to aliased v= ariables would be unacceptable or cause problems, then don't include "all".= But otherwise I think it's best to include "all". I include "all" routin= ely since I haven't written an access type definition where I thought that = those access objects *must* refer to heap-allocated objects in all cases. = (If Ada 95 had been designed from scratch, it would have been better to pro= vide an additional keyword to designate access types that must be heap-allo= cated, if a distinction had to be made at all. But they were considering t= he possibility that a pool-specific access type would be represented as a p= ool-relative offset rather than as an address, and that there could be Ada = 83 compilers already doing that.) -- Adam