Op Thu, 28 Feb 2008, schreef Michael Schnell:
Of course the compiler should be internally consistent. A record written on
i.e. Windows should be readable on i.e. Linux. Only if {$packrecords C}
is used, we pack records according to ABI, as to interface with the OS.
Are any bitpacked structures used in the API of any OS ?
Probably not, but the "OS" should be interpreted broadly here, any C
library can expose bitpacked structures, therefore they can be
standardized in ABIs.
If hardware access is an issue: how should endianess be handled ? The
compiler does know about the endianess of the processor, but it does not know
about what endianess the user needs in the hardware. Thus it would be
necessary to define it via a kind of compiler option.
The compiler can only care about processor endianness. Having a known
binary structure is something different as being usable for hardware
access.
Daniël
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel