[fpc-devel] unexpected results with succ() and fpc 2.4.0
Stefan Kisdaroczi
kisda at hispeed.ch
Mon Jan 4 14:49:06 CET 2010
Am 04.01.2010 14:26, schrieb Jonas Maebe:
>
> On 04 Jan 2010, at 14:07, Stefan Kisdaroczi wrote:
>
>> ---- 8< ----
>> program divsucc;
>>
>> begin
>> writeln( 256 DIV succ(255) );
>> end.
>> ---- 8< ----
>>
>> Free Pascal Compiler version 2.4.0 [2009/12/18] for i386
>> Copyright (c) 1993-2009 by Florian Klaempfl
>> Target OS: Win32 for i386
>> Compiling divsucc.pas
>> divsucc.pas(4,16) Error: Division by zero
>> divsucc.pas(7) Fatal: There were 1 errors compiling module, stopping
>> Fatal: Compilation aborted
>>
>> Comments? Hints?
>
> It's a compiler bug that got triggered by another fix. You can work
> around it for now by using something like "256 DIV succ(longint(255))"
Thanks for the fast reply. No Problem to work around this one, but there are 1788 succ() calls :-o in our applications :-)
That was the only one that did not compile. All others did compile, but some of them will probably not work.
If its considered a bug i'm fine. Is there already a bugtracker id? Should i add a bugreport?
kisda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20100104/ab032718/attachment.sig>
More information about the fpc-devel
mailing list