Florian Klaempfl schrieb:
They also asked me to send them some code which illustrates the
problem, which they claim should not exist because the compiler should
make sure everything is aligned.
FPC does too as long as you don't force the compiler to use a certain
memory layout like using the packed keyword
Actually, FPC handles even packed types correctly by assuming that they
are unaligned so the example below is the worst case but there the
compiler can't do anything but the user can apply the unaligned keyword
to tell the compiler that the data is unaligned:
Unaligned(plongint(100003)^):=1234;
or casting unaligned
pointers like plongint(100003)^:=1234;
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal