This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53930] bug in linker
- From: "bespalovdn at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 12 Jul 2012 06:59:09 +0000
- Subject: [Bug c++/53930] bug in linker
- Auto-submitted: auto-generated
- References: <bug-53930-4@http.gcc.gnu.org/bugzilla/>
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 ?