| Summary: | local extern declaration gets wrong namespace | ||
|---|---|---|---|
| Product: | gcc | Reporter: | Jason Merrill <jason> |
| Component: | c++ | Assignee: | Jason Merrill <jason> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | gcc-bugs, pinskia |
| Priority: | P3 | Keywords: | patch, wrong-code |
| Version: | 4.5.0 | ||
| Target Milestone: | 4.6.0 | ||
| Host: | Target: | ||
| Build: | Known to work: | ||
| Known to fail: | Last reconfirmed: | 2010-02-22 20:50:04 | |
| Bug Depends on: | |||
| Bug Blocks: | 41998 | ||
| Attachments: | patch for 4.6 | ||
Created attachment 19937 [details]
patch for 4.6
If f is done inside "namespace N{}", it works
Fixed for 4.6. |
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.