C++ PATCH: Builtins (2 of 3)

Phil Edwards pedwards@disaster.jaj.com
Thu May 24 18:51:00 GMT 2001


On Thu, May 24, 2001 at 06:17:52PM -0700, Mark Mitchell wrote:
> and a use of `memset' in libsupc++ that should have been
> `std::memset'.

Shouldn't we also do the following?  It's including <cstdlib> not <stdlib.h>,
so malloc and free should be qualified.  (Also abort(), but that's trickier.)


Index: eh_alloc.cc
===================================================================
101c101
<   ret = malloc (thrown_size);
---
>   ret = std::malloc (thrown_size);
161c161
<     free (ptr - sizeof (__cxa_exception));
---
>     std::free (ptr - sizeof (__cxa_exception));



More information about the Libstdc++ mailing list