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,35af79fb6fbb1bb2 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed.straub-nv.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Problem with representation clause in gnat 4.3 Date: Fri, 3 Oct 2008 21:36:54 -0500 Organization: Jacob's private Usenet server Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1223088523 26434 69.95.181.76 (4 Oct 2008 02:48:43 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 4 Oct 2008 02:48:43 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news2.google.com comp.lang.ada:7953 Date: 2008-10-03T21:36:54-05:00 List-Id: "Michael Bode" wrote in message news:gc655v$702$1@online.de... ... > Obviously gnat wants to align to DWORD boundaries in the 2nd case but > not in the 1st. Why and what can I do about it? I can't answer the why (you'd have to ask the GNAT implementers that), but the usual fix is to give the size of the record type: for Compound'Size use 80; We did that for all of the interface record types in Claw, because otherwise compilers tended to come up with different answers (and that didn't work very well). For instance, Janus/Ada would have used Size = 72 for this record (which wouldn't matter in this case, but might in some circumstances). Randy.