Mail Archives: djgpp/2001/07/03/08:50:50
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 -