commenting out #define causes error

It's something to do with the way the IDE preprocesses your code.

If you add this line to the very start, the error goes away:

char foo;