I was just attempting to port a bit of code from Delphi 2 and got a "FPE Error in Compiler" it happened in both 1.0.7 and 1.1, on the following snippet :
Mailing lists / fpc-devel / 2002-11
const bug in compiler?
4 messages · 2 people ·
- Aandrew johnson 3
- MMarco van de Voort 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
err.. ignore this.. I never sent it.. I filed a bug report instead and closed the window.. never even hit send...
Whatever.
Andrew
andrew johnson wroteI was just attempting to port a bit of code from Delphi 2 and got a "FPE Error in Compiler" it happened in both 1.0.7 and 1.1, on the following snippet :
I was just attempting to port a bit of code from Delphi 2 and got a "FPE Error in…
I was just attempting to port a bit of code from Delphi 2 and got a "FPE Error in Compiler" it happened in both 1.0.7 and 1.1, on the following snippet :
[]
By performing intensive meditation on your short above snippet, I guess that this is probably because you are exceeding the size of an IEEE double, and Delphi2 maps it to a extended.
Though FPC's numerical library is still very ugly and rough, the exact values you are probably looking for, are defined in package numlib, unit "typ" (though you can't easily get to them, they are encoded):
2.220446049250313E-016 (eps)
1.797693134862316E+308 (largest double)
2.225075980502992E-308 (smallest)
for double, and
1.0842021724855044E-0019
9.9918856055392512E+4931
3.6451995318824746E-4951
for extended.
yes.. I figured that that was what was CAUSING the error.. but that wasn't the point. The point was the compiler crashed for no good reason.. I would understand a "value exceeds size of IEEE Double" error or the like and in -d2 mode give a warning and simply map it to extended.
Andrew
