This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
mixing code compiled with different options
- To: gcc at gcc dot gnu dot org
- Subject: mixing code compiled with different options
- From: Panos Tsirigotis <panos at tivo dot com>
- Date: Wed, 19 Jan 2000 01:54:15 +0000
I am trying to determine which of the following scenarios
are supposed to work when compiled with gcc. Let's say
that there is a library L, and a program P that have been
compiled separately: one was compiled with -f<option> and
the other was compiled with -fno-<option>
(the underlying OS/hardware is Linux x86)
A) -frtti/-fno-rtti
Is the (P,L) combination supposed to work ?
If so, what happens when P (or L) tries to use dynamic_cast on
an object returned by L (or P) ?
B) -fexceptions/-fno-exceptions
Will the (P,L) combination work, as long as
no exceptions are thrown ?
Will it work if any exceptions thrown are handled
within the code (P or L) that was compiled with
exception support ?
C) -fvtable-thunks/-fno-vtable-thunks
Can virtual methods of L objects be called from P objects,
and vice versa ?
Finally, how does the compiler version (2.7.x, 2.8.x, 2.95.x)
affect the answers to the above questions ?
Thanks,
Panos