I have just update to 1.6.6 and now all my static function cause a problem. Example -
static void doSomething()
{
}
void setup() {
doSomething();
}
void loop() {
}
That is perfectly valid C/C++ code but this very simple example fails with error message
exit status 1
'void doSomething()' was declared 'extern' and later 'static' [-fpermissive]
The example works perfectly without problems on earlier 1.x.x versions that I have used.
My intention in using 'static' is to make sure there is no name clash with external functions (this is what static is for in this context). It seems that the pre-processing performed by the IDE when creating the temporary source file creates forward references to extern'ed' functions making them global instead of just local so one cannot have local functions.
Now I can get round this by going through all my projects and removing the 'static' keyword from my local functions but I should not need to do this. Note - 'static' variables do not have this problem.