[fpc-devel]Another FPC versus Delphi issue

Jonas Maebe jonas at zeus.rug.ac.be
Mon Oct 15 15:14:16 CEST 2001


On vrijdag, oktober 12, 2001, at 05:36 , KJK::Hyperion wrote:

>> >   a: array [ Integer ] of Integer;
>> [...]
>> > Under Delphi (v5) this gives an compile-time error (Data type too
>> > large:  exceeds 2GB)
>> [...]
>> > It seems to me that fpc should give a compile-time error, rather
>> > than crash.
>> It allocates only 4 bytes for the array.
>
> Why? Isn't Integer a range type?

Yes, but in Delphi integer = longint and this cause the size calculation 
of the array in the compiler to overflow. It's fixed now (the 
calculation is now done with int64's instead of longints).


Jonas





More information about the fpc-devel mailing list