This seems to be a tricky problem. I indeed use the CDT internal builder.
I just made a small test project and it works fine, the only difference is
the gcc compiler version (I assume the compiler has nothing to do with the
problem). How do you control (disable) dependency check in the internal
builder? I've looked everywhere. By the way, I first noticed the problem
after installing the latest 3.5 Eclipse version.
Unfortunatelly this is not the only glitch I notice after going 3.5 (you
might read some more on other threads). Funny how now a days SW upgrade
goes hand in hand with usability downgrade and no apparent user benefit.