Skip to content

preprocessor issue when "{" is present #51

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

Closed
ffissore opened this issue Nov 9, 2015 · 3 comments
Closed

preprocessor issue when "{" is present #51

ffissore opened this issue Nov 9, 2015 · 3 comments
Milestone

Comments

@ffissore
Copy link
Contributor

ffissore commented Nov 9, 2015

From @qbahn21 on November 9, 2015 15:27

Arduino 1.6.6 and 1.6.7:
Try to compile this sketch for an AVR board. It results in a compilation error: "'f2' was not declared in this scope".

ifdef SAM3X8E // Arduino Due compatible

void fake()
{
}

else

void fake ()
{
}

endif

void f1(){ f2(); }
void f2(){;}

void setup() {
}
void loop() {
}

But when lines 3 and 4 are commented out like this:

ifdef SAM3X8E // Arduino Due compatible

void fake()
//{
//}

else

...
the sketch compiles just fine. Why does a code that shouldn't be included prevents a compilation?

Copied from original issue: arduino/Arduino#4118

@ffissore
Copy link
Contributor Author

ffissore commented Nov 9, 2015

Confirm. Thank you @qbahn21

@ffissore
Copy link
Contributor Author

Fixed by 40328a0. I'll keep you posted when the IDE hourly is available

@ffissore
Copy link
Contributor Author

Hourly builds available @qbahn21 See http://www.arduino.cc/en/Main/Software#hourly Thank you for the heads up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants