www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/03/08:50:50

Date: Tue, 3 Jul 2001 15:50:49 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Tom St Denis <tomstdenis AT yahoo DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: malloc() problem, DJDEV 203
In-Reply-To: <T7807.80082$Mf5.22355219@news3.rdc1.on.home.com>
Message-ID: <Pine.SUN.3.91.1010703154831.19306S-100000@is>
MIME-Version: 1.0
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

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019