On Thu, Dec 05, 2013 at 12:05:23PM -0500, Jason Merrill wrote: > On 12/05/2013 10:59 AM, Oleg Endo wrote: > >On Thu, 2013-12-05 at 10:45 -0500, Jason Merrill wrote: > >>A simple workaround would be to disable poisoning of malloc/realloc on > >>OS X (or when the build machine uses libc++, if that's easy to detect). > > > >Whether libc++ uses malloc/realloc/free in some implementation in a > >header file or not is an implementation detail. It could use it today > >and stop doing so tomorrow ;) > > Yep, which is why I described my suggestion as a workaround. :) > > But having the poisoning disabled when building with clang doesn't > seem like a significant problem even if it becomes unnecessary, > since any misuse will still show up when building stage 2 and on > other platforms.
Guess the problem is that clang pretends to be (old) version of GCC. Otherwise all the poisioning, which is guarded by: #if (GCC_VERSION >= 3000) wouldn't be applied. So perhaps we want a hack there && !defined __clang__ or similar. Jakub