[Gambas-user] Overflow Errors with Gambas 3.18 and Master
Claus Dietrich
claus.dietrich at freenet.de
Sat Jan 14 22:39:58 CET 2023
Am 14.01.23 um 19:14 schrieb Benoit Minisini:
> Yes, but the computation overflows. This was ignored by Gambas 3.17.3,
> and is now detected by Gambas 3.18.0.
>
> The fact that the overflow leads to the expected result relies on an
> implicit behaviour of the underlying CPU. But the C standard
> explicitly says that arithmetic overflow lead to unspecified results.
> In other words, this is an error to write code that relies on that
> specific CPU behaviour.
>
> In practice, it's not a big deal, as the only CPUs I'm aware of where
> oveflow does not always behave the "expected" way are Cray Computer CPUs.
>
> Anyway, to let your old project run as before, there is now a
> 'System.IgnoreOverflow' property that restores the old behaviour. Just
> set this property to TRUE at the beginning of your program.
>
> Regards,
Thanks a lot for this exhaustive explanation. Your suggested
modification on the code works perfectly.
Am 13.01.23 um 22:29 schrieb Benoit Minisini:
> Le 13/01/2023 à 22:13, Claus Dietrich a écrit :
>> This morning I received an email from a friend with a screenshot of
>> an error message which occurred in his Gambas IDE after he upgraded
>> to 3.18:
>>
>> This application has raised an unexpected error and must abort
>>
>> [7] Overflow
>>
>> [gb.form.editor].CDocument.HighlightLine.935
>>
>> He seems to run the IDE under QT5.
>
> This is a bug to fix.
On behalf of Hans: Is someone taking care of it? Anything required from
Hans? Shall I report it in the bugtracker?
Best regards
Claus
More information about the User
mailing list