From: "Nick Roberts" <nick.roberts@acm.org>
Subject: Re: Rep spec for tagged type
Date: Fri, 13 Aug 2004 18:07:18 +0100
Date: 2004-08-13T18:07:18+01:00 [thread overview]
Message-ID: <opscokigrnp4pfvb@bram-2> (raw)
In-Reply-To: 87n00z8exk.fsf@goofinder.dyndns.org
On 13 Aug 2004 20:47:59 +0930, Daniel Wild <dan@example.com> wrote:
> I'm trying to create a rep spec for a tagged type and getting errors
> from GNAT that say `compoonent overlaps tag field of ...'.
>
> I gather this means that GNAT stores the tag for the type at the
> beginning of the memory used for the type and I'm trying to overwrite
> that by starting my rep spec at 0.
>
> So, I figure I need to shift my rep spec along by however big the tag
> is. How can I find the size of this? (I'd rather do it properly that
> assume it's 32 bits on my machine).
The expression:
Ada.Tags.Tag'Size
will probably give you the size of the tag, but for its position you
will have to look in the GNAT documentation (maybe it is 0).
Unfortunately, I think this means your code may not be portable.
--
Nick Roberts
prev parent reply other threads:[~2004-08-13 17:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-13 11:17 Rep spec for tagged type Daniel Wild
2004-08-13 14:08 ` Georg Bauhaus
2004-08-14 9:40 ` Daniel Wild
2004-08-13 17:07 ` Nick Roberts [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox