Closed
Description
This code is not properly transformed from .ino to .cpp; the line containing "0" is erroneously emitted right after the #include "Arduino.h" statement resulting in a diagnostic such as:
buggy.ino:5: error: expected unqualified-id before numeric constant
Rewriting the macro "abc" so it fits on one line avoids the problem. Note also that the line number referenced in the error message is not the line number of the macro definition or the expansion, making it difficult to find what is wrong in a large program.
#define abc \
0
void
setup()
{
abc;
}
void
loop()
{
}
I saw this using1.5.6-r2 BETA, but have not tested it on previous versions.
Peter Olson