<div style="font-family: arial, helvetica, sans-serif"><font size="2"><br><br><div class="gmail_quote">On Mon, Jun 25, 2012 at 1:10 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-family:arial,helvetica,sans-serif"><font size="2">Hello,<div><br></div><div>On modern Linux installs, glibc has a very annoying practice: it adds an empty exception specifier to lots of libc functions as an optimization. It only does this if the compiler is modern and GCC-like, and we are compiling in C++ mode.</div>

<div><br></div><div>This, however, causes GCC to complain about signature mismatches between the glibc functions declared in malloc.h and those defined as an alias in the interceptors library:</div><div><br></div><div>..../asan_malloc_linux.cc:57:1: error: declaration of 'void free(void*)' has a different exception specifier</div>

<div>/usr/include/malloc.h:66:13: error: from previous declaration 'void free(void*) throw ()'</div><div><br></div><div><br></div><div>I've attached a complete hack of a patch to address this... but surely there is a better way? I'm open to suggestions about this sticky issue.</div>
</font></div></blockquote><div><br></div><div>ouch! </div><div>How do I reproduce the failure? </div><div>For me, the code build fine with gcc (4.4.3 and 4.7.0). </div><div><br></div><div>--kcc </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-family:arial,helvetica,sans-serif"><font size="2">
<div><br></div><div>Amusingly, this is only diagnosed by GCC, not by Clang. =] So I didn't even notice it at first.</div><span class="HOEnZb"><font color="#888888"><div>-Chandler</div></font></span></font></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></font></div>