If you encounter this error in Eclipse check if you are declaring a function within a function.
Nested functions are available as a language extension in GCC but not part of the standard language.
So the next time you see ‘invalid storage class for function ‘blah’, do a quick check on where you have defined your function.