From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Kevin Buettner Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH RFA] utils.c: Fix xcalloc (0, 0) behavior Date: Mon, 05 Mar 2001 12:28:00 -0000 Message-id: <3AA3F64E.9F0302A5@cygnus.com> References: <1010303075808.ZM24102@ocotillo.lan> X-SW-Source: 2001-03/msg00078.html Kevin Buettner wrote: > > According to section 16.1 in Harbison & Steele, it is permissible for > calloc(0,0) to return either NULL or an implementation defined unique > pointer. I've come across an implementation of calloc() which chooses > to return NULL. Does anyone know what the ISO-C standard has to say? I think it would be helpful if xcalloc() not only followed ISO-C but also did it in a consistent way across platforms. nice catch, Andrew