Sigh… I really must be unlucky, I got this bug ('forced rebuild on compile') too.
It's really hard to report it indeed…
My gcc is 4.2.1 too (under Debian).
I don't have any problem under Gentoo where gcc version is older (I'll reboot to make it clear).
*rebooting*
Indeed, my Gentoo's gcc version is 4.1.2.
That said, Code::Blocks version is 1.0_pre20070618, thus it's really hard to say which of CB or gcc is incriminated…