From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: GNAT GPL 2013 bug?
Date: Fri, 9 Aug 2013 13:55:40 -0500
Date: 2013-08-09T13:55:40-05:00 [thread overview]
Message-ID: <ku3dve$7o5$1@loke.gir.dk> (raw)
In-Reply-To: hrkm713gcc7n$.mep6a9ijq09k.dlg@40tude.net
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
news:hrkm713gcc7n$.mep6a9ijq09k.dlg@40tude.net...
> On Fri, 9 Aug 2013 03:38:21 -0700 (PDT), sbelmont700@gmail.com wrote:
...
> Now add "tagged" to Q:
>
> type Q is tagged null record;
> procedure P (X : access Q) is null;
>
> Y : access Q := null;
> begin
> P (Y); -- This is not OK?
>
> I didn't searched ARM for this, but if indeed so, this is a language bug
> to
> me.
It's not a bug, but a required compatibility wart. In Ada 95, anonymous
access always excluded null, and the semantics of dispatching require that
null is excluded from controlling parameters. Requiring explicit writing of
"not null" on all controlling parameters would have made all existing Ada 95
code (like Claw) incompatible with Ada 2005, so that could not be
considered. The only remaining option was the implicit "not null" for
controlling parameters. It's not pretty, but there was no other choice. (If
Ada 95 had had "not null" like it should have, this would not have been a
problem.)
We tried to require Ada 95 compilers to support "not null" syntactically for
anonymous parameters (with no semantic meaning), so people could write their
code sensibly, but we were told that we can't change obsolete standards in
any way.
Randy.
next prev parent reply other threads:[~2013-08-09 18:55 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-09 9:47 GNAT GPL 2013 bug? Dmitry A. Kazakov
2013-08-09 10:38 ` sbelmont700
2013-08-09 11:01 ` Dmitry A. Kazakov
2013-08-09 11:06 ` sbelmont700
2013-08-09 11:36 ` Dmitry A. Kazakov
2013-08-09 15:48 ` Adam Beneschan
2013-08-09 16:11 ` Simon Wright
2013-08-09 16:52 ` Adam Beneschan
2013-08-09 18:25 ` Simon Wright
2013-08-09 18:39 ` Adam Beneschan
2013-08-09 19:28 ` Adam Beneschan
2013-08-09 20:05 ` Robert A Duff
2013-08-09 20:30 ` Adam Beneschan
2013-08-09 21:35 ` Simon Wright
2013-08-10 15:10 ` Shark8
2013-08-09 16:03 ` Simon Wright
2013-08-09 18:55 ` Randy Brukardt [this message]
2013-08-09 19:27 ` Dmitry A. Kazakov
2013-08-09 20:04 ` Robert A Duff
2013-08-10 6:51 ` Dmitry A. Kazakov
2013-08-12 16:52 ` Adam Beneschan
2013-08-12 17:03 ` Dmitry A. Kazakov
2013-08-12 17:20 ` Adam Beneschan
2013-08-12 18:34 ` Dmitry A. Kazakov
2013-08-12 20:12 ` Randy Brukardt
2013-08-13 6:43 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox