[fpc-devel] Freepascal in microcontrollers
Jonas Maebe
jonas.maebe at elis.ugent.be
Wed Feb 27 12:56:24 CET 2008
On 27 Feb 2008, at 12:17, Vinzent Hoefler wrote:
> On Wednesday 27 February 2008 11:47, Daniƫl Mantione wrote:
>
>> Then use bitpacked records:
>
> If you'd document them properly?
I don't understand why it's not in the 2.2.0 docs, because the doc
changes were committed to svn on 2007-06-29, which was before the
2.2.0 release (and there are no different branches for the
documentation afaik).
> Free Pascal Compiler version 2.0.0 [2005/09/09] for i386
> Copyright (c) 1993-2005 by Florian Klaempfl
> Target OS: Linux for i386
> Compiling test.pas
> test.pas(6,10) Error: Identifier not found "bitpacked"
"bitpacked" was introduced in version 2.2.0 (which is the latest
official release).
That said, bitpacking is unsuited for hardware interfacing because it
is opaque: there is guarantee whatsoever regarding the layout (just
like with sets). FPC's current implementation on all platforms is
mostly the same as GPC's bitpacking and structs declared in GCC using
__attribute__((__packed__)), but not entirely (on some platforms and
with some types, GCC nevertheless still inserts padding bits when
using __attribute__((__packed__)), while we never do that currently).
The bit layout is also different on little and big endian systems.
Jonas
More information about the fpc-devel
mailing list