From: Victor Porton <porton@narod.ru>
Subject: Re: Unchecked_Union record inside an other record - trouble
Date: Fri, 08 Aug 2014 23:12:07 +0300
Date: 2014-08-08T23:12:07+03:00 [thread overview]
Message-ID: <ls3auj$m92$1@speranza.aioe.org> (raw)
In-Reply-To: y7aFv.170530$C87.77739@fx07.iad
Shark8 wrote:
> On 08-Aug-14 13:56, Victor Porton wrote:
>> For records interfacing with C it SHOULD be ignored completely. Because
>> it is C.
>
> Not in your example; the subcomponent is part of a record which is *not*
> a C-style union, it should therefore store the proper tag value
> (discriminant) in its own discriminant.
>
> type T2(K: Kind) is
> record
> Z: int;
> Ob: T(K);
> end record
> with Convention=>C;
>
> Yields:
> warning: variant record has no direct equivalent in C
> warning: use of convention for type "T2" is dubious
> So, remove Convention => C.
You forgot "with Unchecked_Union". Certainly your code does not work.
--
Victor Porton - http://portonvictor.org
next prev parent reply other threads:[~2014-08-08 20:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-08 15:36 Unchecked_Union record inside an other record - trouble Victor Porton
2014-08-08 16:01 ` Adam Beneschan
2014-08-08 16:56 ` Victor Porton
2014-08-08 18:52 ` Shark8
2014-08-08 19:56 ` Victor Porton
2014-08-08 20:06 ` Pascal Obry
2014-08-08 20:09 ` Shark8
2014-08-08 20:12 ` Victor Porton [this message]
2014-08-08 20:22 ` Shark8
2014-08-08 20:28 ` Victor Porton
2014-08-08 21:07 ` Shark8
2014-08-08 19:52 ` Victor Porton
2014-08-08 19:57 ` Adam Beneschan
2014-08-08 19:21 ` Per Sandberg
2014-08-08 20:01 ` Victor Porton
2014-08-08 21:23 ` Jeffrey Carter
2014-08-10 7:25 ` Per Sandberg
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox