Marc Weustink wrote:


Copy back was already thrown away with Fortran 66 I think because it caused too much trouble.


I'll believe it will give troubles in certain situations, I only have no idea where (then again, I'm only a compiler user).

r.i could have also an alias so the example above isn't equal to a direct usage of r.i.


alias ??

var p : plongint; i : longint;

...
p:[EMAIL PROTECTED];



And keep in mind: the problem is much smaller than you think :) Normal pascal (without packed, ugly pointer arithmetics or absolute) compiles fine in 99.99 per cent of all cases. Further, all C/C++ code of e.g. KDE, GNOME, OpenOffice etc. works on cpus requiring alignment of data without special compiler tricks, ugly programmer tricks or heavy usage of memcpy.


The reason why I started this thread was that I was a bit disappointed that running Lazarus on sparc failed. To apply all kinds of patches and ifdefs for platforms not supporting unaligned access was not an option for me.
Today I realized that the only sensible use of packed records is when interfacing with external libraries. The chance that this is needed unaligned on a sparc is pretty much zero. So my request for unalinged access makes no sense.
I'll have a look why packed records are used internally.

That's what I meant: usually, alignment issues are caused only by legacy code which uses packed. Newly created code doesn't cause problems usually.



_______________________________________________ fpc-devel maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to