http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53930
DmitryBespalov <bespalovdn at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID | --- Comment #2 from DmitryBespalov <bespalovdn at gmail dot com> 2012-07-12 06:59:09 UTC --- Andrew, where I violating C++ rule? Did you check the code I've attached? There is file1.cpp with struct A definition: struct A { A() { std::cout << "file1.A::A()\n"; } }; , and struct with same name in file2.cpp: struct A { A() { std::cout << "file2.A::A()\n"; } }; NOTE: none of them were declared in headers, so test1() from file1.cpp knows nothing about struct A from file2.cpp. So, why I get "file2.A::A()" printing while calling test1() from file1.cpp ?