[Gambas-user] Should Gambas detect integer overflow?

Christof Thalhofer chrisml at deganius.de
Mon Dec 5 12:11:45 CET 2022

Am 04.12.22 um 20:33 schrieb Benoit Minisini:

> So, I wonder if Gambas should raise an error if an integer overflow is
> detected (when doing an integer +, - or *)?
> Note that the change is not backward compatible for program that
> explicitly rely on the undefined behaviour of overflow arithmetic in C.
> Which is not a good idea anyway...
> What do you think?

I think yes. Because not everyone who programs in Gambas is aware of the 
underlying problem that integers can overflow.

I have to admit that I also almost never think about it when using 
integer or long variables.

Alles Gute

Christof Thalhofer

Dies ist keine Signatur

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20221205/eb8962c2/attachment.sig>

More information about the User mailing list