This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: valgrind confused by std::allocator calls to operator new(0)


On Tue, Feb 22, 2005 at 03:30:46PM +0100, Paolo Carlini wrote:
> >This may be out of context...  The standard defines that allocators
> >(and operator new) may be asked for zero bytes. 
> 
> I'm pretty sure we already briefly discussed this corner case. I think the
> behavior of 3.3 (returning *always* zero in this case), is perfectly ok,
> because of this note in Table 32, about allocate:
> 
>    "Note: If n == 0, the return value is unspecified."

You can't turn your back on those people for a second.

Nathan Myers
ncm@cantrip.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]