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

Implement Range Checks for Immediate Values in Global Variable Initializers #89

Open
Y-Nak opened this issue Nov 26, 2024 · 0 comments
Open
Labels
good first issue Good for newcomers help wanted Extra attention is needed parser

Comments

@Y-Nak
Copy link
Collaborator

Y-Nak commented Nov 26, 2024

Currently, the Sonatina-ir parser does not perform range validation on integer Immediate values within global variable initializers. This lack of checking can lead to the assignment of out-of-range integer values, potentially causing unexpected behavior or runtime errors.

Proposed Solution:

  • Add Range Validation:
    • Implement checks to ensure that integer Immediate values are within the valid range for their specified integer types.
  • Error Handling:
    • Generate informative error messages when an out-of-range value is detected during parsing/ir-building.
  • Testing:
    • Create test cases to verify that the parser correctly identifies and handles out-of-range values.
@Y-Nak Y-Nak added help wanted Extra attention is needed good first issue Good for newcomers parser labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed parser
Projects
None yet
Development

No branches or pull requests

1 participant