From: awdorrin <awdorrin@gmail.com>
Subject: Re: Interfacing between Ada and C: records and structs
Date: Tue, 31 Jul 2012 12:44:33 -0700 (PDT)
Date: 2012-07-31T12:44:33-07:00 [thread overview]
Message-ID: <38e1e122-b788-4863-88ce-6b1fd5372e43@googlegroups.com> (raw)
In-Reply-To: <m2vch3loj8.fsf@nidhoggr.home>
This is code from the POSIX Florist API for Ada. There is a comment in the code that says that the 'Dummy' tagged null record is:
"to force by-reference parameter mode"
Your test code matches up with similar code I wrote on my system, except being 32-bit I get D as "range 0 .. 31"
The 'rep' files generated by -gnatR3s for the Florist POSIX API gives:
for DUMMY'Size use 32;
for DUMMY'Alignment use 4;
for DUMMY use record
_TAG at 0 range 0 .. 31;
end record;
for MUTEX'Object_Size use 256;
for MUTEX'Value_Size use 224;
for MUTEX'Alignment use 8;
for MUTEX use record
MUTEX at 0 range 0 .. 191;
D at 24 range 0 .. 31;
end record;
So at least I understand why it isn't 192 bits, but 256.
next prev parent reply other threads:[~2012-08-07 6:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-31 16:38 Interfacing between Ada and C: records and structs awdorrin
2012-07-31 17:16 ` Niklas Holsti
2012-07-31 18:44 ` awdorrin
2012-07-31 19:08 ` awdorrin
2012-07-31 19:27 ` Simon Wright
2012-07-31 19:44 ` awdorrin [this message]
2012-07-31 20:46 ` Niklas Holsti
2012-08-01 12:16 ` awdorrin
2012-07-31 19:23 ` Simon Wright
2012-08-02 4:39 ` Shark8
2012-08-02 12:32 ` awdorrin
[not found] <7beb59ba-ca6f-476e-8b39-604196b0b79f@googlegroups.com>
2012-08-01 2:51 ` Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox