comp.lang.ada
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
Subject: Re: Ada 2012 : aliased parameters ?
Date: Thu, 28 Apr 2011 21:47:37 +0200
Date: 2011-04-28T21:47:37+02:00	[thread overview]
Message-ID: <87mxjaf99i.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: ip37ae$n4q$1@munin.nbi.dk

* Randy Brukardt:

>> Is it necessary that Element is a discriminant?
>
> Yes, because access discriminants have special accessibility rules which 
> happen to have the right effect.

This is unfortunate because it means that this cannot be used to make
variadic argument list trick safer and less of a hack.

> It did, but only for bugs. The access discriminant semantics is from Ada 95, 
> although it was never defined properly (probably still isn't, although not 
> for the lack to trying). We've just found a good use for the strange 
> semantics.

I don't think the difference is observable in Ada 95 because you
couldn't return new objects of limited type.

By the way, how tight are the access level checks?  Is it relatively
safe to assume that if an Ada 2005 compiler compiles a program which
makes heavy use of anonymous access types and runs it without
exceptions, then there are no dangling pointers?  (Ignoring unchecked
deallocation, of course.)



  reply	other threads:[~2011-04-28 19:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-28 11:47 Ada 2012 : aliased parameters ? Yannick Duchêne (Hibou57)
2011-03-28 11:56 ` Dmitry A. Kazakov
2011-03-29  3:04   ` Randy Brukardt
2011-03-28 11:56 ` AdaMagica
2011-03-29 18:22   ` Florian Weimer
2011-03-29 18:34     ` Shark8
2011-03-29 19:35       ` Florian Weimer
2011-03-30  0:12     ` Randy Brukardt
2011-03-29  3:16 ` Randy Brukardt
2011-03-29  7:34   ` Maciej Sobczak
2011-03-30  0:09     ` Randy Brukardt
2011-03-30 19:44       ` Randy Brukardt
2011-04-23 18:47   ` Florian Weimer
2011-04-25  7:19     ` Randy Brukardt
2011-04-28 19:47       ` Florian Weimer [this message]
2011-04-28 23:54         ` Randy Brukardt
2011-04-30 18:32           ` Florian Weimer
2011-04-30 23:46             ` 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