From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e49db73f947323a6 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: GNAT for a PPC Mac OS X machine Date: Mon, 18 Apr 2011 20:08:19 +0300 Organization: Tidorum Ltd Message-ID: <9139g4FbnoU1@mid.individual.net> References: <9133l8FtmtU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net Z7aDkK2jHT0w1Mgk1YToVgiH4SgZcsL2VzYkF5DJFIkFXwvYQ/ Cancel-Lock: sha1:EQLULAU4m87ZXbzFIqgogeXi1T0= User-Agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100328) In-Reply-To: Xref: g2news1.google.com comp.lang.ada:18862 Date: 2011-04-18T20:08:19+03:00 List-Id: Bill Findlay wrote: > On 18/04/2011 16:28, in article 9133l8FtmtU1@mid.individual.net, "Niklas > Holsti" 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 . @ .