comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: How many Ada compiler bugs are here?
Date: Fri, 13 Jan 2012 15:30:37 -0800 (PST)
Date: 2012-01-13T15:30:37-08:00	[thread overview]
Message-ID: <7a8f802e-8d70-4d97-8b85-3f87dafa0899@u20g2000yqb.googlegroups.com> (raw)
In-Reply-To: 0980607c-df6d-4769-bf6c-288c5666b40f@a11g2000vbz.googlegroups.com

On Jan 13, 12:06 pm, Blady <p....@orange.fr> wrote:
>
> > > 1. Adjust should not be allowed to be declared (it is a *limited*
> > > type). But I have defined it to trace the remaining bugs:
>
> > There's nothing wrong with defining "Adjust" (you can define any named
> > subprogram you want, of course), but (A) "overriding" shouldn't be allowed
> > on it, and (B) it shouldn't be called automatically if it is defined without
> > "overriding", because it is not special for a limited type.

> Hello,
> back to point 1), assuming GNAT is used, the private spec of
> Ada.Finalization is
>    package SFR renames System.Finalization_Root;
>    type Controlled is abstract new SFR.Root_Controlled with null
> record;
>    --  In order to simplify the implementation, the mechanism in
> Process_Full_
>    --  View ensures that the full view is limited even though the
> parent type
>    --  is not.
>    type Limited_Controlled is
>      abstract new SFR.Root_Controlled with null record;
> and
>    type Root_Controlled is tagged null record;
>    procedure Adjust     (Object : in out Root_Controlled);
>    procedure Finalize   (Object : in out Root_Controlled);
>    procedure Initialize (Object : in out Root_Controlled);
> So with GNAT Adjust is part of Limited_Controlled primitives, isn't
> it?
>
> Best, Pascal.

Since Limited_Controlled is derived from SFR.Root_Controlled in the
*private* part of Ada.Finalization, any primitive operations that get
inherited shouldn't be visible to any place that can't see the private
part of Ada.Finalization; and therefore this should not affect the
legality of anything.  Maciej's package says

  overriding procedure Adjust (...)

which is illegal because Adjust isn't supposed to be visible to his
package.  If GNAT is accepting this, this means that some stuff that
should be invisible is visible, and that's a bug.

                              -- Adam



  reply	other threads:[~2012-01-13 23:32 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12 23:20 How many Ada compiler bugs are here? Maciej Sobczak
2012-01-13  0:21 ` Randy Brukardt
2012-01-13  1:26   ` Adam Beneschan
2012-01-13  8:23     ` Dmitry A. Kazakov
2012-01-13  8:47       ` AdaMagica
2012-01-13  9:07         ` Dmitry A. Kazakov
2012-01-13  9:35           ` AdaMagica
2012-01-13 10:00             ` Dmitry A. Kazakov
2012-01-13 10:38               ` georg bauhaus
2012-01-13 11:39                 ` Dmitry A. Kazakov
2012-01-13 12:43                   ` Georg Bauhaus
2012-01-13 13:06                     ` AdaMagica
2012-01-13 13:16                       ` AdaMagica
2012-01-13 13:22                       ` Georg Bauhaus
2012-01-13 13:29                         ` Dmitry A. Kazakov
2012-01-13 10:52               ` AdaMagica
2012-01-13 11:35                 ` Dmitry A. Kazakov
2012-01-13 12:58                   ` AdaMagica
2012-01-13 13:43                     ` Dmitry A. Kazakov
2012-01-13 15:06                       ` Robert A Duff
2012-01-13 15:46                         ` Dmitry A. Kazakov
2012-01-13 17:42                           ` georg bauhaus
2012-01-13 18:52                             ` Dmitry A. Kazakov
2012-01-14  0:26                           ` Randy Brukardt
2012-01-14  9:49                             ` Dmitry A. Kazakov
2012-01-19  1:35                               ` Randy Brukardt
2012-01-19 10:33                                 ` Dmitry A. Kazakov
2012-01-14  2:41                           ` Robert A Duff
2012-01-13 17:23               ` Adam Beneschan
2012-01-14  2:41                 ` Robert A Duff
2012-01-13 17:15       ` Adam Beneschan
2012-01-13 20:06   ` Blady
2012-01-13 23:30     ` Adam Beneschan [this message]
2012-01-14 13:29       ` Brian Drummond
2012-01-19  1:47         ` Randy Brukardt
2012-01-19  4:24           ` Adam Beneschan
2012-01-20  0:04             ` Randy Brukardt
2012-01-14 10:20   ` Maciej Sobczak
2012-01-14 14:03     ` Brian Drummond
2012-01-16 16:35     ` Adam Beneschan
2012-01-20 10:43       ` Brian Drummond
replies disabled

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