From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: GNAT for a PPC Mac OS X machine
Date: Mon, 18 Apr 2011 20:08:19 +0300
Date: 2011-04-18T20:08:19+03:00 [thread overview]
Message-ID: <9139g4FbnoU1@mid.individual.net> (raw)
In-Reply-To: <C9D21B6E.9939%yaldnif.w@blueyonder.co.uk>
Bill Findlay wrote:
> On 18/04/2011 16:28, in article 9133l8FtmtU1@mid.individual.net, "Niklas
> Holsti" <niklas.holsti@tidorum.invalid> wrote:
>
>> Bill Findlay wrote:
>>
> ]>> The problem now is a portability issue.
>>> I have the declarations:
>>>
>>> type word is mod 2**48;
>>>
>>> ...
>>>
>>> type field_of_16_bits is mod 2**16;
>>>
>>> type Q_part is new field_of_16_bits;
>>>
>>> type Q_register is
>>> record
>>> C_part, I_part, M_part : Q_part;
>>> end record;
>>> for Q_register'Size use KDF9.word'Size;
>>>
>>> And this is fine in Intel. But on PPC, we get the error:
>>>
>>> 92. for Q_register'Size use word'Size;
>>> |
>>>>>> size for "Q_register" too small, minimum allowed is 64
>>> It's puzzling that the compiler refuses to give Q_register the size that it
>>> happily gave to word. (The aspect clause is there to support unchecked
>>> conversions between the word and Q_register types.)
...
> I did not give the complete declaration, which is:
>
> type Q_register is
> record
> C_part, I_part, M_part : KDF9.Q_part;
> end record;
> for Q_register'Size use KDF9.word'Size;
> for Q_register'Bit_Order use Low_Order_First;
> for Q_register use
> record
> C_part at 0 range 32 .. 47;
> I_part at 0 range 16 .. 31;
> M_part at 0 range 0 .. 15;
> end record;
Bill, have you tried putting the record representation clause before the
'Size clause? That might help the compiler.
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
next prev parent reply other threads:[~2011-04-18 17:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-17 14:02 GNAT for a PPC Mac OS X machine Bill Findlay
2011-04-17 14:43 ` Simon Wright
2011-04-17 18:47 ` Bill Findlay
2011-04-18 1:50 ` Bill Findlay
2011-04-18 9:30 ` Simon Wright
2011-04-18 14:31 ` Bill Findlay
2011-04-18 15:28 ` Niklas Holsti
2011-04-18 15:46 ` Bill Findlay
2011-04-18 17:08 ` Niklas Holsti [this message]
2011-04-19 3:07 ` Bill Findlay
2011-04-18 15:52 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox