comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam@spam.com>
Subject: Re: Ada Pointer Problem
Date: Fri, 01 Oct 2004 18:15:59 GMT
Date: 2004-10-01T18:15:59+00:00	[thread overview]
Message-ID: <z9h7d.430$M05.357@newsread3.news.pas.earthlink.net> (raw)
In-Reply-To: <mailman.147.1096645836.390.comp.lang.ada@ada-france.org>

David C. Hoos wrote:

> The principle is that Object exists only when procedure B is
> executing, and what is trying to be prevented is having a value
> of type X_Ptr available when Object no longer exists.  This could
> happen if B were not the main procedure, but were instead a
> library-level procedure that could be called by some other
> subprogram.

Since the main procedure may be called recursively, it can happen with 
the main procedure as well.

> Since procedure B is known to the programmer to be the main
> procedure, in this case, if one is using GNAT, one could
> use the 'Unrestricted_Access attribute, instead of the 'Access
> attribute, and do what you want.

'Unchecked_Access is part of the language, and more portable than 
'Unrestricted_Access.

-- 
Jeff Carter
"You cheesy lot of second-hand electric donkey-bottom biters."
Monty Python & the Holy Grail
14




  reply	other threads:[~2004-10-01 18:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-01 15:26 Ada Pointer Problem skidmarks
2004-10-01 15:50 ` David C. Hoos
2004-10-01 18:15   ` Jeffrey Carter [this message]
2004-10-01 17:24 ` Ludovic Brenta
  -- strict thread matches above, loose matches on Subject: below --
2004-10-01 19:34 aschwarz1309
2004-10-02  0:47 ` Jeffrey Carter
2004-10-02 23:37   ` Randy Brukardt
2004-10-06 15:43     ` skidmarks
2004-10-06 18:19       ` Jeffrey Carter
2004-10-16  3:53         ` Benjamin Ketcham
2004-10-16 13:25           ` John B. Matthews
2004-10-18 18:09           ` Georg Bauhaus
2004-10-06 19:29       ` Georg Bauhaus
2004-10-07 18:45         ` skidmarks
2004-10-08  0:35           ` Jeffrey Carter
2004-10-08 12:02           ` Jean-Pierre Rosen
2004-10-08 16:58             ` Ludovic Brenta
2004-10-08 23:26             ` Björn Persson
2004-10-10 18:01             ` skidmarks
2004-10-08 14:03           ` Georg Bauhaus
2004-10-08 14:23           ` Dale Stanbrough
replies disabled

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