comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: Warning: accessibility check failure with GNAT GPL 2013
Date: Mon, 28 Oct 2013 17:13:41 +0100
Date: 2013-10-28T17:13:41+01:00	[thread overview]
Message-ID: <526e8d35$0$9522$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <m8uj6pxbsxrh$.1jwxgyor2dhw8$.dlg@40tude.net>

On 28.10.13 16:49, Dmitry A. Kazakov wrote:
> Use a named access type instead. E.g.
> 
>    type Cyclic_Thread_Ptr is access all Cyclic_Thread:

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.)

(In general, it is best to avoid anonymous types,
as they are  a source of trouble, as they hide information,
leaving the compiler in the dark about the scope of the
anonymous type, and as they may also require additional
run-time checks, like Dmitry explains.)

  parent reply	other threads:[~2013-10-28 16:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-28 13:49 Warning: accessibility check failure with GNAT GPL 2013 sangomarco
2013-10-28 14:26 ` Dmitry A. Kazakov
2013-10-28 15:23   ` sangomarco
2013-10-28 15:49     ` Dmitry A. Kazakov
2013-10-28 16:05       ` sangomarco
2013-10-28 16:13       ` Georg Bauhaus [this message]
2013-10-28 17:31         ` Adam Beneschan
2013-10-31  1:28       ` Randy Brukardt
replies disabled

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