-
-
Notifications
You must be signed in to change notification settings - Fork 114
Auto generated function declarations no longer works for callbacks assigned at variable declaration #180
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
Hi @AlexanderBrevig, class BUG {public:BUG(void (*fn)(void)){}};
BUG b(&makeItBreak); //this will not break
void setup(){}
void loop(){}
void makeItBreak(){} it works correctly with released builder. |
It is an improvement but does not help in that it still is not 'backward compatible'. If I have to choose explaining moving a function above it, and adding the & I'll go for the former. I'd personally still like this to be included though :) personally it's a win! Sadly though, not for the target audience. |
Fixes arduino#206 The sample code from the issue provided a smart way to cheat the dumb FP parser. In fact, the & is referred to the return type (correct) but the comparator doesn't know about semantics and simply prepends the ampersand before searching for the match. So the code matches itself, which makes absolutely no sense. Avoiding this occurrence fixes the issue, however the entire code for prototype line insertion should be refactored in a saner way (see arduino#180 and arduino#191 for another problem)
Fixed by 3282535 |
Here's and example that will break the auto generation of function declarations in the IDE, not sure for how long but I've gotten regular support request for a good while now.
The only thing I know, this used to work.
The text was updated successfully, but these errors were encountered: