Open
Description
Using Arduino IDE Beta build 25 with Windows 7 64 bit
- Install FastLED library (it's in the Library Manager index)
- Compile the following sketch (EDIT: for Arduino/Genuino Uno or other AVR board):
#include <FastLED.h>
void setup() {
foo();
}
void loop() {}
void foo() {}
Error:
C:\Users\per\AppData\Local\Temp\arduino_modified_sketch_198423\sketch_nov21a.ino: In function 'void setup()':
sketch_nov21a:5: error: 'foo' was not declared in this scope
void loop() {}
^
arduino-preprocessor -debug
output:
https://gist.githubusercontent.com/per1234/e2e45e7b84de756ae1782178790c5830/raw/ecdd542f40c951ca8b93f9a585ee72366f6fcfaa/sketch_nov21a.ino.cpp
Examination of the generated .ino.cpp file shows that the foo()
prototype was never generated, rather than being inserted in the wrong place.
The issue does not occur in Arduino IDE 1.8.5.
Originally reported at: http://forum.arduino.cc/index.php?topic=512898