comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Odd/Broken behavior DOTNET-GNAT vs GNAT regarding tagged types.
Date: Fri, 22 Oct 2010 16:20:17 -0700 (PDT)
Date: 2010-10-22T16:20:17-07:00	[thread overview]
Message-ID: <bcf3d59a-f6b5-4c1c-a3c7-918cbe610647@o15g2000prh.googlegroups.com> (raw)
In-Reply-To: 4c89d345-c3ce-4ac4-a9d1-c1c93727f819@h7g2000yqn.googlegroups.com

On Oct 22, 12:58 pm, Shark8 <onewingedsh...@gmail.com> wrote:
> On Oct 22, 10:22 am, Adam Beneschan <a...@irvine.com> wrote:
>
>
>
>
>
> > On Oct 21, 8:35 pm, Shark8 <onewingedsh...@gmail.com> wrote:
>
> > > Hey everyone; I just got bit with a bit of a surprise regarding the
> > > differences in how tagged types are treated by GNAT vs DOTNET-GNAT,
> > > The output of 'external_tag shows why the behavior of the Ada.Tags
> > > Package is broken under DOTNET.
>
> > Not sure what you're trying to do here, or why this is causing a
> > problem.  The RM says that the default 'External_Tag is implementation-
> > defined, so you shouldn't depend on it being a certain value, or else
> > you should write your own "for Tagged_Base'External_Tag use ..."
> > clause.  My apologies if you already knew this and had some other
> > reason for being surprised.
>
> >                                   -- Adam
>
> > [snip]
>
> > > -- .NET output
> > > ----------------------
> > > C:\PROGRA~3\TEMPOR~1\testing>tag_error.exe
> > > External tag for base type: tagged_base_pkg.tagged_base
> > > External tag for child type: tagged_base_pkg.tagged_child
>
> > > Tagged child is NOT a decendant.
>
> > > -- Native output
> > > ----------------------
> > > C:\PROGRA~3\TEMPOR~1\testing>tag_error.exe
> > > External tag for base type: TAGGED_BASE_PKG.TAGGED_BASE
> > > External tag for child type: TAGGED_BASE_PKG.TAGGED_CHILD
>
> > > Tagged child is a decendant.
>
> Ah, the only reason there's an 'External_Tag reference is for output
> onscreen display {lazy shortcutting of
> Ada.Tags.External_Tag(Item'Tag), which should give the same thing};
> the real oddity is the behavior of Is_Descendant_At_Same_Level which
> doesn't readily appear to use the external formatting of the tag.

Is_Descendant_At_Same_Level does appear to be wrong in the DOTNET-GNAT
version.  However, as an implementor, I would be very surprised if
Is_Descendant_At_Same_Level tries to use external tags to compute the
result.  I guess that's why I was confused by your original statement,
that the difference in external tag behavior "shows why the behavior"
of Is_Descendant_At_Same_level is broken.  It should be unrelated.

                             -- Adam



  reply	other threads:[~2010-10-22 23:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22  3:35 Odd/Broken behavior DOTNET-GNAT vs GNAT regarding tagged types Shark8
2010-10-22  8:01 ` Georg Bauhaus
2010-10-22 16:22 ` Adam Beneschan
2010-10-22 19:58   ` Shark8
2010-10-22 23:20     ` Adam Beneschan [this message]
2010-10-23  1:57       ` Shark8
2010-10-25 15:34         ` Adam Beneschan
replies disabled

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