-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Bug: splitting define causes java regex error and arduino won't compile #1935
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
Comments
What IDE version are you using? IDE 1.5.x has a couple of fixes related to your problem |
Waiting for feedback from too long. Reopen it if needed! |
Although this is a pre-pre-processor problem, it is also deprecated C++ syntax. The recommended way to write this is: #define SERIAL_BANNER This takes advantage of the fact that in modern C/C++ compilers, successive string literals are concatenated as if they had been written as a single literal. Peter Olson |
Please give a try to the IDEs linked at the bottom of this email on the dev list |
(I'm not the original poster.) Tested this fix, it works. Peter Olson
|
New preprocessor tracked at #2636. Builds for testing it are available |
Using the source for 1.6.5, this does not cause an error. |
I confirm that this has been fixed on the latest release. Please reopen if needed. |
This doesn't compile:
define SERIAL_BANNER "\
"
It causes this:
Exception in thread "Thread-6" java.lang.StackOverflowError
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[..]
Changing it to:
define SERIAL_BANNER "1) Scan for sensors\n2) Change sensor I2C address\n3) Show readings for all sensors\n"
makes it work...
Marcin
The text was updated successfully, but these errors were encountered: