crashappsec / libcon4m

Base Compiler and Runtime Support for con4m
Apache License 2.0
0 stars 0 forks source link

tests: consider testing of integer overflow #72

Open ee7 opened 2 weeks ago

ee7 commented 2 weeks ago

With:

Running c4test with this .c4m file:

"""
Test of integer overflow.
"""
"""
$output:
9223372036854775807
-'..--).0-*(+,))+(0(
"""

x = 9223372036854775807
print(x)

x += 1
print(x)

currently passes. Probably not a high priority. But if we want an error at some point, and test coverage for similar things, let's track that in this issue.

viega commented 1 week ago

I'm not sure how I want to handle it; lots of options (promote to bigint, trap, exception), and no huge hurry.