We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Compiling integer varies from previous IDE version In 1.8.6 it seems to be bad, not in range -32768..+32768 At least when compiled to Arduino Nano.
Simplest check: void setup() { Serial.begin(115200); } void loop() { for (int i = 30000;; i++) Serial.println(i); }
And another check with even more strange behavior: void setup() { Serial.begin(115200); } void loop() { for (int i = 33000;; i++) Serial.println(i); }
In version 1.6.5 everything OK.
The text was updated successfully, but these errors were encountered:
Closing as duplicate of #4511
Signed integer overflow is undefined behavior. You can't rely on any specific results.
There is a proposal that would make it behave as you expect: #4624
Sorry, something went wrong.
No branches or pull requests
Compiling integer varies from previous IDE version
In 1.8.6 it seems to be bad, not in range -32768..+32768
At least when compiled to Arduino Nano.
Simplest check:
void setup() {
Serial.begin(115200);
}
void loop() {
for (int i = 30000;; i++) Serial.println(i);
}
And another check with even more strange behavior:
void setup() {
Serial.begin(115200);
}
void loop() {
for (int i = 33000;; i++) Serial.println(i);
}
In version 1.6.5 everything OK.
The text was updated successfully, but these errors were encountered: