Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.compilers    |    Compiler construction, theory, etc. (Mod    |    2,753 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,552 of 2,753    |
|    RealCat to All    |
|    How C compilers handle multiple function    |
|    28 Dec 08 18:12:00    |
      From: typingcat@gmail.com              If there are functions whose names are the same in object files and       library files, what should happen during the compliation? Should this       always cause a link error, or can C compilers make assumptions such       as : "function definition in the object file has higher precedence       over the one in the library file" or "the one in the previously linked       library file has higher precedence over the ones in the library files       linked later."?              Is there any standard behaviour for this case or does it vary with       compiler implimentations?       [Usually linkers only pull in library routines that satisfy unresolved       references, so if there's a duplicate, the linker just ignores it. A       more interesting question is what happens when the program has a definition       of A and a reference to B, and a library module defines both A and B.       -John]              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca