<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Enable -fvisibility-ms-compat flag might have the same effect as
-fvisibility-inlines-hidden, as my test.<br>
I think our project should change the way how constructor/destructor
use, as gcc/clang/msvc not always the same.<span
class="moz-smiley-s1"><span> :-) </span></span><br>
<br>
<div class="moz-cite-prefix">On 12/03/2015 11:00 AM, Weitian Leung
wrote:<br>
</div>
<blockquote class=" cite" id="mid_565FB03E_7090305_gmail_com"
cite="mid:565FB03E.7090305@gmail.com" type="cite">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<blockquote class=" cite" id="Cite_6783294" type="cite"><a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://gcc.gnu.org/wiki/Visibility"><a class="moz-txt-link-freetext" href="https://gcc.gnu.org/wiki/Visibility">https://gcc.gnu.org/wiki/Visibility</a></a>
says "However, -fvisibility-inlines-hidden can be used with no
source alterations, unless you need to override it for inlines
where address identity is important either for the function
itself <b>or any function local static data.</b>" (Clearly this
is somewhat bogus: if the addresses of function local statics
are different, their contents may also be different.)</blockquote>
<blockquote class=" cite" id="Cite_9039997" type="cite">The
behavior of this switch is not quite the same as marking the
methods as hidden directly, because it <b>does not affect
static variables local to the function</b> or cause the
compiler to deduce that the function is defined in only one
shared object.</blockquote>
<br>
Thanks for your detailed explanation.<br>
<br>
One more strange thing, remove the -fvisibility-inlines-hidden
flag not works with some codes of our project.<br>
I can't reproduce for a simple demo for now. Another flag we use
is -fvisibility-ms-compat, before adding it for gcc, all works
fine.<br>
Now both gcc and clang are broken. (Since the counter code enables
in debug build only, it's not so important for now)<br>
<br>
I will remove -fvisibility-ms-compat rebuild with clang and test
again.<br>
<br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<i>Regards</i></div>
</body>
</html>