Date: Tue, 3 Jul 2001 15:50:49 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Tom St Denis cc: djgpp AT delorie DOT com Subject: Re: malloc() problem, DJDEV 203 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 3 Jul 2001, Tom St Denis wrote: > > No, there are far too many programs that expect malloc(0) to succeed, > > even if the standard allows it to fail. > > While I agree that seems practical it isn't "a good thing". > > What if we find another flaw in GCC ... shall we keep it because people have > been using it? Whatever it is, it's not a flaw in GCC. malloc is implemented in the library, which was written for and is maintained by the DJGPP project. As for the issue itself, returning non-NULL for malloc(0) is not a flaw of any kind. On the contrary, it's largely considered to be a feature.