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: a07f3367d7,d8ff1403929a72c0 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.82.195 with SMTP id k3mr1334593pay.23.1344322826491; Tue, 07 Aug 2012 00:00:26 -0700 (PDT) Path: g9ni2995028pbo.0!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!ctu-peer!news.nctu.edu.tw!csnews.cs.nctu.edu.tw!news.cs.nctu.edu.tw!feeder.erje.net!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Interfacing between Ada and C: records and structs Date: Tue, 31 Jul 2012 20:27:07 +0100 Organization: A noiseless patient Spider Message-ID: References: <296e271a-967b-4dfb-8dca-f278ecfae03d@googlegroups.com> <5813d3d2-8a9f-4a08-bf09-db3c62847593@googlegroups.com> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="edf2659fbb8cb6d4b5f62db4b36ac1e6"; logging-data="8419"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/YvVfk8rJAQ/OPGbLsHEpxSqyXhHCp004=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (darwin) Cancel-Lock: sha1:qO4fHCVtQF+3XNVFXnD7AMozp3s= sha1:6Px6+ZYz6Wyj8tAy1gZufnfa0WY= Content-Type: text/plain Date: 2012-07-31T20:27:07+01:00 List-Id: awdorrin writes: > I am wondering if the Dummy element in the Mutex record is not being > treated as a null, but as a null pointer, adding 8 bytes to the record > size. If you say type Dummy is null record; then no space is reserved for the tag. But if that is OK, what is it _for_? Normally something like this is needed to pad out parts of a C struct that you don't need to bother with, but that's clearly not the case here.