Preprocessor bug in 0017/Mac

Greetings.

I tried the following source with the IDE 0017/Mac OS/X 10.6:

void setup(void) {}

void loop(void) {}

#if 0
int main (int argc, char * const argv[])
{
return 0;
}
#endif

I get the spurious error:

"In function 'int main()':
error: declaration of C function 'int main()' conflicts with"

Could someone please tell me why any source text between the two preprocessor directives is being scanned for anything other than other preprocessor directives?

The Arduino environment does some things to your sketch before it passes it off to the avr-gcc compiler. See "Transformations to the main sketch file" at http://arduino.cc/en/Hacking/BuildProcess for details.

I have not read the source code for the Arduino pre-pre-processor, but I suspect it is not honoring the preprocessor directives when it does its scan.

Thank you for your prompt and helpful reply.

The typedefs in my program's source were also giving me problems. I'll probably have to use the "include "*.cpp" kludge.

By the way, is there a good preprocessor symbol to use in the context:

#ifdef TargetIsArduino
...
#endif