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,fd173879a595bde X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!newsread.com!news-xfer.newsread.com!nntp.abs.net!news.abs.net!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Default rep specs for record types - documented?? References: <1131118073.282094.236790@f14g2000cwb.googlegroups.com> From: Stephen Leake Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:j7I8T0/LNdAXqfOQ3RkTx8n9UOY= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 05 Nov 2005 05:14:10 -0500 NNTP-Posting-Host: 66.159.65.1 X-Complaints-To: abuse@toad.net X-Trace: news.abs.net 1131185663 66.159.65.1 (Sat, 05 Nov 2005 05:14:23 EST) NNTP-Posting-Date: Sat, 05 Nov 2005 05:14:23 EST Xref: g2news1.google.com comp.lang.ada:6229 Date: 2005-11-05T05:14:10-05:00 List-Id: "Ed Falis" writes: > But if you order the components the same in both languages, and use > pragma Convention (C, ...) on the Ada side, the Ada record layout > will match the C struct layout. This has always bothered me, because it is so poorly defined. Which C compiler? With which settings of the various layout options? If I'm compiling with GNAT, I could guess that it's 'gcc' and 'the defaults'; but the point of rep clauses is to not guess. But if I'm compiling with GNAT and trying to interface to Borland C with the equivalent of 'pack structs', it's just plain wrong. On VAX and Alpha, this might have some meaning, because DEC defined a binary API. But on x86, it's just a guess. -- -- Stephe