The following program should not compile: extern int foo; static union { int foo; // clash }; C++ standard clause 9.5/2 states that members of anonymous unions must have names distinct from other names in the same scope. If the `extern' keyword is removed from the example above, the error is diagnosed correctly (followed by an ICE).
This bug appears to be no longer present in GCC 4.2.1.
Yes, fixed long time ago.