Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: consider testing of integer overflow #72

Open
ee7 opened this issue Jul 4, 2024 · 1 comment
Open

tests: consider testing of integer overflow #72

ee7 opened this issue Jul 4, 2024 · 1 comment
Labels
enhancement New feature or request P4 Priority 4 (lower is higher)

Comments

@ee7
Copy link
Contributor

ee7 commented Jul 4, 2024

With:

  • libcon4m b4fdc8e
  • x86_64
  • Linux 6.9.7
  • gcc 14.1

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
Copy link
Contributor

viega commented Jul 5, 2024

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

@viega viega added P4 Priority 4 (lower is higher) enhancement New feature or request labels Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P4 Priority 4 (lower is higher)
Projects
None yet
Development

No branches or pull requests

2 participants