From: sangomarco@gmail.com
Subject: Re: Warning: accessibility check failure with GNAT GPL 2013
Date: Mon, 28 Oct 2013 09:05:48 -0700 (PDT)
Date: 2013-10-28T09:05:48-07:00 [thread overview]
Message-ID: <c2daf9b9-0285-4dfc-9261-f3a7cd427daa@googlegroups.com> (raw)
In-Reply-To: <m8uj6pxbsxrh$.1jwxgyor2dhw8$.dlg@40tude.net>
Le lundi 28 octobre 2013 16:49:28 UTC+1, Dmitry A. Kazakov a écrit :
> On Mon, 28 Oct 2013 08:23:40 -0700 (PDT), sangomarco@gmail.com wrote:
>
>
>
> > Thanks for your quick response. I don't have enough experience with Ada,
>
> > please could you tell me more about the rule? I don't understand why this
>
> > is not allow.
>
>
>
> It is allowed, unfortunately. That is why you have got only warning, not an
>
> error. Unfortunately, because it does not make sense in 90% of cases in
>
> practice.
>
>
>
> > My goal is to create a main task which makes a successor
>
> > tasks if necessarry. And, since I cannot use the sybtype mak to create a
>
> > new task in the current execution of a main task body as the following
>
> > declaration
>
>
>
> Use a named access type instead. E.g.
>
>
>
> type Cyclic_Thread_Ptr is access all Cyclic_Thread:
>
>
>
> Informally, "new" adapts to the expected access type. So does the anonymous
>
> access type from its side. When both meet each other there is no
>
> information available to determine the scope where the allocated object
>
> would live. The language rules use the most conservative estimation of that
>
> scope (the body of the subprogram), which in practice never corresponds to
>
> the programmer's intent. The resulting accessibility check necessarily
>
> fails at run time. Be glad you were warned by the compiler.
>
Thanks, I get it.
--
best regards,
Marc
next prev parent reply other threads:[~2013-10-28 16:05 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 [this message]
2013-10-28 16:13 ` Georg Bauhaus
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