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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.7.7 with SMTP id b7mr2116qab.5.1376326350018; Mon, 12 Aug 2013 09:52:30 -0700 (PDT) X-Received: by 10.182.29.196 with SMTP id m4mr11011obh.2.1376326349899; Mon, 12 Aug 2013 09:52:29 -0700 (PDT) Path: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!f7no2042449qan.0!news-out.google.com!he10ni1415qab.0!nntp.google.com!fx3no2140300qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 12 Aug 2013 09:52:29 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=RxNzCgoAAACA5KmgtFQuaU-WaH7rjnAO NNTP-Posting-Host: 66.126.103.122 References: <19fr4wmxmen$.gjbias2fj461$.dlg@40tude.net> <1pe6z4dg2xk9j$.1wdn31ijaldz3.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4589f4c3-a1c7-4fa7-9b79-89a9917502bf@googlegroups.com> Subject: Re: GNAT GPL 2013 bug? From: Adam Beneschan Injection-Date: Mon, 12 Aug 2013 16:52:30 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 2551 Xref: number.nntp.dca.giganews.com comp.lang.ada:182980 Date: 2013-08-12T09:52:29-07:00 List-Id: On Friday, August 9, 2013 11:51:34 PM UTC-7, Dmitry A. Kazakov wrote: > On Fri, 09 Aug 2013 16:04:02 -0400, Robert A Duff wrote: > I can "dispatch" on null anyway: >=20 > type T is tagged null record; > procedure P (X : T) is null; > procedure R (X : access T'Class); >=20 > procedure R (X : access T'Class) is > begin > X.P; > end R; But I could write procedure R (X : access T'Class) is begin if X =3D null then -- take some special default action else X.P; end if; end R; The point is that when a caller calls R, the above procedure is simply call= ed. So it will work to call it with a null parameter; the code in R may la= ter run into a Constraint_Error or not, depending on how it's written, but = there's no problem calling R. But when P is called, the dispatching occurs= *at* *that* *point*, before any code in any of the P procedures is execute= d; if the parameter is null, the dispatch cannot work. I'm really not clear at all on what point you're trying to make. -- Adam