From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: GNAT GPL 2013 bug? Date: Fri, 9 Aug 2013 13:55:40 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <19fr4wmxmen$.gjbias2fj461$.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1376074542 7941 69.95.181.76 (9 Aug 2013 18:55:42 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 9 Aug 2013 18:55:42 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:16732 Date: 2013-08-09T13:55:40-05:00 List-Id: "Dmitry A. Kazakov" 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.