[fpc-devel] Freepascal in microcontrollers
daniel.mantione at freepascal.org
Thu Feb 28 08:19:31 CET 2008
Op Wed, 27 Feb 2008, schreef Jonas Maebe:
>> In other words, if there will be ever differences as to target platforms,
>> this has to happen only under $packrecords C, or an equivalent directive
>> for bitpacked records.
> There is no equivalent directive for bitpacked records, and supporting
> C-style bitpacking is impossible with regular Pascal syntax ("char c:1" and
> "int c:1" are often laid out differently in C depending on the previous
> fields, but there is no way to express this difference using plain Pascal;
> you need extra attributes -- not to mention that those packing rules are
> often quite hairy, and it would be a mess to implement them all).
Okay, then we do not support "ABI" packed records, we can support
it, but aren't after all required to support it.
As long as the compiler is consistent between platforms, it is okay.
Differences between little/big endian are acceptable because this is the
only situation where we require the coder to manually intervene and write
two code paths (usually a simple endian conversion). We don't force the
coder to make different code paths between i.e. Linux/Windows, nor should
More information about the fpc-devel