<div style="font-family: arial, helvetica, sans-serif"><font size="2"><div class="gmail_quote">On Mon, Jun 25, 2012 at 2:42 AM, Alexander Potapenko <span dir="ltr"><<a href="mailto:glider@google.com" target="_blank">glider@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 class="im">On Mon, Jun 25, 2012 at 1:10 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:<br>
</div><div class="im">> Hello,<br>
><br>
> On modern Linux installs, glibc has a very annoying practice: it adds an<br>
> empty exception specifier to lots of libc functions as an optimization. It<br>
> only does this if the compiler is modern and GCC-like, and we are compiling<br>
> in C++ mode.<br>
><br>
> This, however, causes GCC to complain about signature mismatches between the<br>
> glibc functions declared in malloc.h and those defined as an alias in the<br>
> interceptors library:<br>
><br>
> ..../asan_malloc_linux.cc:57:1: error: declaration of 'void free(void*)' has<br>
> a different exception specifier<br>
> /usr/include/malloc.h:66:13: error: from previous declaration 'void<br>
> free(void*) throw ()'<br>
</div>Looking at /usr/include/malloc.h I don't see any instances of throw()<br>
(Goobuntu Lucid)<br>
Shouldn't we have the same set of standard headers?<br>
</blockquote></div><br><div>Ahem, not everyone works where we do? ;]</div><div><br></div><div>I'm testing this on a very generic Linux box. I think you'll find that the preprocessed source of malloc.h does include throw(). It's burried inside of MALLOC_P, other macros, __THROW, etc. But eventually it gets there.</div>
</font></div>