-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Comments at end of concatenation macro cause error #5079
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
Seeing this again in Arduino IDE 1.9 beta.
|
Interesting isue. From the error in the last comment, it seems that the preprocessor is converting the It does seem this is a compiler bug. From the C++11 (draft) spec (2.2.3):
This happens before processing preprocessing tokens, so the code shown should compile. However, I'm not able to reproduce this error with any of the compilers I have at hand here. I do not have the 1.9 beta installed, but I do not believe the arm gcc version is changed there. @thinkyhead, could you show a more self-contained example (or test the example from @jrt999 in your setup) and provide some more details about your setup (what board/core are you using, what core version) and a full verbose compile output (enable in preferences) would also help in reproducing this. |
It sounds to me like arduino/arduino-preprocessor#6 EDIT: I'm referring to the issue reported by thinkhead, which only occurs with Arduino IDE 1.9.0 Beta. The code supplied by jrt999 causes an error in Arduino IDE 1.8.5 as well as 1.9.0 beta |
Here's a branch of Marlin that should exhibit the issue on build (for RADDS/DUE), |
This is also an issue in v1.8.9 (also found by trying to compile Marlin, like @thinkyhead) Example (from https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.0.x/Marlin/src/pins/mega/pins_GT2560_V3.h, line 141): Yields: |
A concatenation macro having a comment at end of same line causes Arduino IDE to fail - appears to be when it is "pasting" for indexing source code. CPP processes the file fine.
Example code
The text was updated successfully, but these errors were encountered: