comp.lang.ada
 help / color / mirror / Atom feed
* pragma Pack does not work on GNAT 5.01a for Redhat Linux.
@ 2007-06-19 13:16 petter_fryklund
  2007-06-19 14:02 ` Georg Bauhaus
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: petter_fryklund @ 2007-06-19 13:16 UTC (permalink / raw)


The Size of the following record is 112 on Linux, but 104 on Solaris.

type Something is record
   A : Packed_16;
   B : Packed_8;
   C : Packed_8;
   D : Packed_8;
   E : Packed_32;
   F : Packed_32;
end record;
pragma Pack (Something);

Where

type Packed_Byte is mod 2 **8;
for Packed_Byte'Size use 8;

type Packed_Bytes is array (Natural range <>) of Packed_Byte;
for Packed_Bytes'Alignment use 1;
for Packed_Bytes'Component_Size use Packed_Byte'Size;

type Packed_8 is new Packed_Bytes (0 .. 0);
for Packed_8'Size use 8;

and similar. Why is pragma Pack ignored?

TIA
/Petter




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2007-08-10 20:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-19 13:16 pragma Pack does not work on GNAT 5.01a for Redhat Linux petter_fryklund
2007-06-19 14:02 ` Georg Bauhaus
2007-06-19 14:15   ` petter_fryklund
2007-06-19 16:16 ` Jeffrey R. Carter
2007-06-19 16:23 ` Adam Beneschan
2007-06-20 15:51 ` Bob Spooner
2007-06-20 16:35   ` Adam Beneschan
2007-06-20 20:50   ` Simon Wright
2007-06-21 14:50     ` Bob Spooner
2007-06-22  5:20       ` Simon Wright
2007-06-29 10:21         ` Ole-Hjalmar Kristensen
2007-07-01 10:57           ` Simon Wright
2007-08-07 10:51             ` Ole-Hjalmar Kristensen
2007-08-10 20:36               ` Simon Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox