That sounds like the arduino preprocessor tool (or whatever it's called) getting dizzy. The tool scans your code and generates function prototypes automatically. In C/C++, a function must be defined first before use. Alternatively, it must be declared before use, and defined later. Arduino has a tool that scans your code and adds prior declarations of your functions as needed. That is what allows you to define a function at the end of a sketch e.g.: below loop(), without having declared it. However, I've seen several weird bugs.