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

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Even at -O3 we inline only functions that either can not be interposed (i.e.
static or -fno-pic) or are known to be same everywhere (comdat and functions
declared inlined). I was considering command line option
-fno-semantic-interposition to control this. Perhaps it is a good idea.

In C++ context I am not really that convinced interposition makes much sense
though. In real life, 99.9% symbols will never be interposed by a symbol with
different semantic and I would say that all of them will be C symbols (malloc).
Given that ELF decided to allow interposition to everything by default, we need
to play safe. 

I tried to discuss in http://gcc.gnu.org/ml/gcc-patches/2013-08/msg01509.html
the consequences of One Definition Rule that IMO prevents two different
implementations of one template coexist in one program. But I lost the case and
the conclusion was that if you fully interpose out one instantiation by
another, OND rule works.

Reply via email to