<div dir="ltr"><div>So, uh, why did solaris's stdlib.h header move these four types in the first place? It sounds like there was some code in the system header that conditionally put them into either the global namespace, or into the std namespace, dependent on the value of <span style="color:rgb(0,0,0)">__cplusplus, yet all C++ compilers ever used on solaris were setting __cplusplus to the version where they were in the global namespace.</span></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><font color="#000000">So...I</font><font color="#000000">'m rather confused, then, as to why this mangling change was made in gcc in the first place, instead of just modifying the system header to not do that. </font>Surely it'd have been saner to move the definitions back to the global namespace unconditionally? (And, I think that could even still be done?)</div><div><br></div><div>For comparison, on linux glibc, tm, div_t, ldiv_t, and lconv are all just defined in :: and imported into std:: with using...</div><div><span style="font-family:monospace">
<br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 13, 2017 at 12:56 PM, Fedor Sergeev via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Greetings folks,<br>
<br>
I just filed a bug on clang mangling:<br>
<a href="https://bugs.llvm.org/show_bug.cgi?id=33767" rel="noreferrer" target="_blank">https://bugs.llvm.org/show_<wbr>bug.cgi?id=33767</a><br>
<br>
which is not clang's bug per se, but rather a bug-incompatibility<br>
with gcc on Solaris (more details in bug report).<br>
<br>
gcc deliberately chose to diverge from mangling as specified by C++ ABI<br>
in order to keep binary compatibility<br>
(see <a href="https://gcc.gnu.org/ml/gcc-patches/2011-08/msg00834.html" rel="noreferrer" target="_blank">https://gcc.gnu.org/ml/gcc-<wbr>patches/2011-08/msg00834.html</a><br>
for discussion of that patch).<br>
<br>
When clang on Solaris links with libstdc++ this binary compatibility<br>
issue kicks in.<br>
<br>
I wonder would the patch doing Solaris-only hack to the mangling<br>
to maintain gcc binary compatibility be welcome here?<br>
Unconditionally or under some flag?<br>
<br>
regards,<br>
Fedor.<br>
______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>