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

ppci-cc: ++ and -- should work for floating point types #103

Closed
tstreiff opened this issue Jul 1, 2020 · 2 comments
Closed

ppci-cc: ++ and -- should work for floating point types #103

tstreiff opened this issue Jul 1, 2020 · 2 comments
Labels

Comments

@tstreiff
Copy link
Contributor

tstreiff commented Jul 1, 2020

float f;
++f;
  ^ Expected integer or pointer

++ and -- should work on any expression for which exp += 1 is legal.
From the C standard: "The expression ++E is equivalent to (E+=1)."
And += supports either: pointer += integer or: arithmetic += arithmetic.

tstreiff added a commit to tstreiff/ppci-mirror that referenced this issue Jul 1, 2020
@windelbouwman
Copy link
Owner

I copied your change, and added some test cases.

@tstreiff
Copy link
Contributor Author

tstreiff commented Jul 5, 2020

I have just checked and it works! thanks!

@tstreiff tstreiff closed this as completed Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants