[fpc-devel]Some set problems

Lee, John LeeJ at logica.com
Fri Nov 16 12:29:47 CET 2001

shouldn't compiler giver werropr/warning then, eg 'Error fpc only supports
4/32 byte set sizes' or similar, when non 4 or 32 set sizes are
used...That's surely better than wrong or dubious results. J 

Subject: Re: [fpc-devel]Some set problems

>May be, these found problems are obsolete and are lready fixed but I could 
>report them.
>FPC 1.1 (my compiler is based on 1-Nov sources):
>1) does not support set of boolean, unlike Delphi and VP;
>2) sizeof applied to set types demonstrates that sets in FPC are not the 
>same as sets in Delphi and VP:
>{$apptype console}
>  t1=set of 0..1;
>  t2=set of 0..15;
>  t3=set of 0..31;
>  t4=set of 0..63;
>  t5=set of 0..127;
>  t6=set of 0..255;
>  writeln(sizeof(t1),' ',
>          sizeof(t2),' ',
>          sizeof(t3),' ',
>          sizeof(t4),' ',
>          sizeof(t5),' ',
>          sizeof(t6));
>Delphi 3, Delphi 6, VP2.1:
>1 2 4 8 16 32
>FPC 1.1:
>4 4 4 32 32 32

We know about this, but it isn't fixed yet and it requires a lot of work to 
fix it :/
It simply has historical reasons. When I implemented the first set support 
in FPC
(probably 7 years ago) I was far away from thinking about making FPC TP or 
Delphi compatible.
So I decided to support only two set sizes: 4 and 32 bytes to make things 

This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.

More information about the fpc-devel mailing list