This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/53930] bug in linker


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53930

Dmitry Bespalov <bespalovdn at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |

--- Comment #4 from Dmitry Bespalov <bespalovdn at gmail dot com> 2012-07-12 07:59:03 UTC ---
Andrew,

Yes, I have two different definitions of "A" struct. But they are defined in
different cpp files, so actually linker should not have ambiguity, which one to
pick up, since the names of these structs for linker should be something like
"file1.A" and "file2.A".
If this rule is broken, then result should be completely anarchy. Suppose we
have 1000 files in the project - there is no guarantee that all the structs
defined in cpps have unique names. And rule "which one to puck up is depend on
link order" or "it could be any random one" are sounds scary to me.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]