[fpc-pascal] struct definition in C

Michael Schnell mschnell at lumino.de
Mon Mar 24 10:29:20 CET 2014


On 03/23/2014 08:06 PM, Bernd Oppolzer wrote:
> I would like to add that bitfields in C are not at all portable;
> it is completely implementation dependant if they are
> allocated from right to left in the structure or the other way round 
> etc.;
>
I _found_ that in bitfield records, with high endian archs gcc starts 
with filling the high bits, while with low endian archs it starts with 
filling the lower bits in the basic type that is given. IMHO this in 
fact does make sense.

I did not find a documentation about this and have no idea whether it is 
likely that other compilers work similar.

-Michael





More information about the fpc-pascal mailing list