On 11 Sep 2012, at 06:18, Alexander Klenin <kle...@gmail.com> wrote:

> How about packed sets? Do they have well-defined memory layout? If
> not, then maybe they should?

Set packing only influences the number of bytes occupied by sets, not their 
internal layout. And I don't think that should change, because they are 
orthogonal issues. You'd need a new directive that would enable unambiguously 
specifying the layout of sets. That would require a lot of code generator 
changes though.

And as an aside, using sets to represent bitmasks isn't even possible today if 
you want portable code, because the current layout on big endian systems does 
not correspond to or'ing (1 shl ord(enumval)). You could of course start 
changing the ordinal values of the enums on big endian systems to compensate, 
but then you get in trouble if they are sometimes also used in a non-bitmask 
context.


Jonas_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to