Odd behavior with #if as first statement

Weird behavior with Arduino 022 and 1.0 were reported in Crashspace googlegroup (http://groups.google.com/group/crashspace/browse_thread/thread/90d18b91ee9f1d4e) today. It seems if the first non-comment statement encountered is a #if FALSE, you get an error.

Simple test code:

#if 1 == 0 
int wtf2 = 1; 
#endif 
void setup() { } 
void loop() {   delay(1000); }

Will give the error:

sketch_dec30a.cpp: In function 'void loop()': 
sketch_dec30a:19: error: 'delay' was not declared in this scope

but change that to #if 1==1
and it works fine.

put any C statement before the #if 1==0 and it works fine
int wtf;

copied

#if 1 == 0 
int wtf2 = 1; 
#endif

into the first line of my current sketch and a few random headers I am working on, did nothing.... no error just like it should.

The arduino IDE places

#include <Arduino.h>

before the first c++ command it sees. It pays no attention to #ifs. So if you just put

char dummy;

before you do any #if s you'll do fine

WizenedEE: It pays no attention to #ifs.
Are you saying the Arduino IDE (cpp) ignores all #if statements?
I doubt it as that would break many things, and it does NOT ignore the line if the arithmetic test evaluates TRUE
#if 1==1

Interestingly, if I explicitly #include <Arduino.h>, or another #include (<SPI.h>), it seems to work.
Using other preprocessor commands like #define do not alter behavior

Perhaps the issue is that the Arduino preprocessing is mis-handling the #if if and only if
a) the arithmetic test evaluates to FALSE
b) no other C code appears before it
here I assumed #include files would have c code not just CPP items, although this may be incorrect. Creating a simple test.h file with #if and a variable definition and #including it did not change behavior of original code - it still fails when arithmetic test is FALSE but works if test is TRUE

There is obviously something strange going on here with how Arduino IDE does its pre-processing.
Kludging in a dummy variable definition is a work-around, but silly one.
If it is required, then it should be documented. --- which is kind of an embarrassing thing to document.