C++ linking v.s. C

deneb_r@efn.org (Nathan A. Yoffa)
19 Dec 1995 14:22:48 -0500

          From comp.compilers

Related articles
C++ linking v.s. C deneb_r@efn.org (1995-12-19)
Re: C++ linking v.s. C dcf@hpesdcf.fc.hp.com (1995-12-20)
| List of all articles for this month |

From: deneb_r@efn.org (Nathan A. Yoffa)
Newsgroups: comp.compilers
Date: 19 Dec 1995 14:22:48 -0500
Organization: Deneb Robotics, Inc.
Keywords: C, C++, question, comment

I am looking for the answer to a (hoepfully) simple question. I have
a large application (~million lines of code) which is written in 'C',
and is actually composed of several DSO's. Because I wish to make
calls into C++ objects (using 'C' wrapper routines) I must LINK my
main program with CC (C++ compler/linker) as opposed to cc ('C'
compiler/linker) so that name-mangling doesn't screw me up.


My question is the folllowing: To what degree does using CC for this
link produce different code (if any). Members of my organization are
paranoid about re-linking related products in this fashion for fear
that it will somehow introduce unknown variables into the situation
which have not been thoroughly debugged/tested.


These other applications are written entirely in 'C', and currently do
not use any C++ object code. For consistency, we would like to have
all our code linked either one way or the other. Please clarify what
"danger" if-any is introduced by linking the 'C' application with CC.


I was hoping to get proof/evidence to demonstrate that for a pure 'C'
application, using CC would produce identical code as cc.


Thanks,




Nathan
[Every C and C++ compiler I know use a common linker. I'd be astonished if
the code changed, though it's possible you might find yourself using C++
libraries where you used to use C libraries. -John]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.