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

missing validation: '&&a` is no valid expression #655

Closed
riederm opened this issue Nov 14, 2022 · 0 comments · Fixed by #673
Closed

missing validation: '&&a` is no valid expression #655

riederm opened this issue Nov 14, 2022 · 0 comments · Fixed by #673
Assignees
Labels
bug Something isn't working good first issue Good for newcomers validation candidate for syntactic or semantic validation

Comments

@riederm
Copy link
Collaborator

riederm commented Nov 14, 2022

#431 allows now expressions like &&a although they cannot be generated correctly,

The first address-of returns an address, not a reference to a pointer. therefore there is nothing we can take the 2nd address from.
So we need a validation that permits taking the address of a value instead of a variable.

invalid expressions:

  • &&x INVALID
  • &100 INVALID
  • &(a+3) INVALID
  • &(a) VALID
@riederm riederm added the bug Something isn't working label Nov 14, 2022
@riederm riederm added the good first issue Good for newcomers label Nov 23, 2022
@volsa volsa self-assigned this Dec 2, 2022
volsa added a commit that referenced this issue Dec 2, 2022
@99NIMI 99NIMI linked a pull request Dec 5, 2022 that will close this issue
@volsa volsa closed this as completed in #673 Dec 9, 2022
volsa added a commit that referenced this issue Dec 9, 2022
Invalid expressions such as `&&x`, `&100` or `&(a+3)` are no longer accepted with this commit.
@riederm riederm added the validation candidate for syntactic or semantic validation label Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers validation candidate for syntactic or semantic validation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants