Skip to content

Arduino 1.6.6 now requires function prototypes in sketches (preprocessor changed?) #1066

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
ladyada opened this issue Nov 21, 2015 · 7 comments

Comments

@ladyada
Copy link

ladyada commented Nov 21, 2015

or at least, all my code didnt work without em :)

e.g.

setup() {
// stuff
}

loop() {
// do things
 myfunction();
}

void myfunction() {
//code
}

no longer works without sticking void myfunction();
at the top (before loop())
is it a big deal? not really, but its ... unusual since neither avr compilation requires nor was this required before.
Its mentioned here https://www.arduino.cc/en/Main/FAQ
"Your sketch undergoes minor changes (e.g. automatic generation of function prototypes) and then is passed directly to a C/C++ compiler (avr-g++)."
perhaps that step is not done anymore?
anyways, ill look into it too

@krzychb
Copy link
Contributor

krzychb commented Nov 21, 2015

I have noticed the same with Arduino-PR-4107-BUILD-421 but assumed this was a special build.
Krzysztof

@ladyada
Copy link
Author

ladyada commented Nov 21, 2015

ok yeah its a thing thats now done with arduino-builder
https://github.com/arduino/arduino-builder
(still doing some investigation but its gonna slow down because i dont speak fluent go)

@ladyada
Copy link
Author

ladyada commented Nov 21, 2015

ok so its actually not even getting to the prototype gen state. what happens is it hits the
#include "ESP8266WiFi.h"
and fails/crashes - never continuing on to the prototype generation stage

@igrr
Copy link
Member

igrr commented Nov 21, 2015

Traced to #include <memory> in WiFiClient.h.
Workaround is possible.

@neuhaus
Copy link

neuhaus commented Dec 21, 2015

I'm affected by this issue, too.
However, the title is wrong - this is not an issue with Arduino 1.6.6, it's an issue with ESP8266 Version 2.0. I was having this problem with Arduino 1.6.5.

@sdamaggio
Copy link

I confirm this behaviour. I'm using Arduino IDE 1.6.7 with esp8266 boards package version 2.0.0.

@igrr
Copy link
Member

igrr commented Feb 1, 2016

This is fixed now in Arduino nightly builds, see arduino/arduino-builder#68.

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

No branches or pull requests

5 participants