comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Longstanding GNAT bug, bad code, or both -- Answer..Bad code.
Date: Tue, 24 Aug 2004 15:57:48 -0500
Date: 2004-08-24T15:57:48-05:00	[thread overview]
Message-ID: <C4WdnYJjvPMFNrbcRVn-ow@megapath.net> (raw)
In-Reply-To: mailman.6.1091897074.414.comp.lang.ada@ada-france.org

This is old, but some enlightenment is provided...

"Stephen Leake" <stephen_leake@acm.org> wrote in message
news:mailman.6.1091897074.414.comp.lang.ada@ada-france.org...
> "Jeff C," <jcreem@yahoo.com> writes:
> > Ok. I submitted a bugzilla report and it has already been
> > cancelled.  Apparently, declaring a variable as aliased makes it
> > contrained.  (According to one of the gcc Ada maintainers)

One would think that the attempt to modify the object inside the procedure
would cause Constraint_Error to be raised. Or was this non-Ada code?

> > After thinking about it, it is probably why the rule was created
> > since I suppose otherwise the alias detection/contraint checking
> > would get pretty hard and potentially computationally expensive at
> > run time...
>
> Sounds reasonable to me. The Annotated reference manual sheds no light
> on this.

If you really want to understand this, read AI-363
(http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00363.TXT). The reason
for the rules have to do with access subtypes. Tucker says it best: "Once I
sat down and began to piece together the set of patches we made to
try to fix the problems with 3.6(11), I was somewhat appalled." (And I would
have left out the "somewhat"! :-)

Anyway, Ada0Y is going to have a bit of incompatibility in this area, making
various access subtypes illegal, and then will drop 3.6(11). That means
"aliased" will no longer have the bizarre side-effect of making things
constrained. (Janus/Ada never got this right anyway, so I'm happy. :-) So
this issue is fixed (it is unfortunate that we didn't get this right in Ada
95).

                      Randy.







  parent reply	other threads:[~2004-08-24 20:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-07  2:29 Longstanding GNAT bug, bad code, or both Jeff C,
2004-08-07  4:05 ` Jeff C,
2004-08-07 15:23   ` Stephen Leake
2004-08-07 14:07 ` Longstanding GNAT bug, bad code, or both -- Answer..Bad code Jeff C,
2004-08-07 16:44   ` Stephen Leake
2004-08-08 11:26     ` Simon Wright
2004-08-24 20:57     ` Randy Brukardt [this message]
2004-08-25 11:00       ` Jeff C,
replies disabled

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