If you don't mind using GCC4 (yes, there was a problem with 4.0.0, but that does not affect the FC4 release, and it still generates unbroken KDE code fine for me) then there is an easy way to do this.
Just edit the configure file and find these lines:
(for amaroK SVN it starts at 4201)
Code:
#ifdef __GNUC__
#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0
choke me
#endif
#endif
Well, you can either take that whole chunk out, or simply change __GNUC_PATCHLEVEL__ from 0 to something arbitrary (why not 1?)
Anyways, hopefully that fixes your problem,
Paul