For this testcase: namespace N { void f(); }
void N::f() { extern int i; extern void g(); i = 1; g(); } namespace N { int i; void g() { } } int main() { } we end up with unsatisfied references to ::i and ::g. -- Summary: local extern declaration gets wrong namespace Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: wrong-code, patch Severity: normal Priority: P3 Component: c++ AssignedTo: jason at gcc dot gnu dot org ReportedBy: jason at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43145