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,e5140c483354bfcc X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Marc A. Criley" Newsgroups: comp.lang.ada Subject: Re: What is correct way to pack records Date: Thu, 18 Nov 2004 12:00:56 -0600 Message-ID: <3046atF2qaqsjU1@uni-berlin.de> References: <3fc90377.0411171620.7a3bcfd9@posting.google.com> <30430rF2qcqp0U1@uni-berlin.de> X-Trace: news.uni-berlin.de uHw3XLgQNuy9OOMbuYCmywRymtfONevs44uxsjNZFfz9RsI1n8 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Xref: g2news1.google.com comp.lang.ada:6277 Date: 2004-11-18T12:00:56-06:00 List-Id: "Jeffrey Carter" wrote: > Marc A. Criley wrote: > > > Yes. Though it carries some baggage that may or may not matter to you. > > > > pragma Convention(C, MyRec); > > This may guarantee the order, but it doesn't guarantee packing, and the > results may vary from one compiler to another. Correct, that's why it's essential that the layout of the record definition be verified against the file record layout. I my experience (with GNAT and Rational Apex) I find that "Convention C" does do the "right" thing, especially since it's supposed to conform to how a C compiler would lay out the data. Marc