On Thu, 2013-06-06 at 16:29 -0400, Jason Merrill wrote: > On 06/06/2013 01:47 PM, Andrew Sutton wrote: > > I never did understand why this happens. Compiling with GCC-4.6, I get > > these errors originating in logic.cc from an include of <algorithm>. > > This is what I get: > > > > /usr/include/c++/4.6/cstdlib:76:8: error: attempt to use poisoned "calloc" > > Ah, I see: adding the include gets the mentions of malloc in before the > names are poisoned. This change is OK. >
I ran into the same issue when I started using C++ std:: stuff in the SH backend code last year. I posted a patch, but somehow it didn't go anywhere... http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00880.html The workaround was to include <cstdlib> as the first include in sh.c. Would it be possible to have the change above also in trunk? Cheers, Oleg