This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfc] asprintf() -> xasprintf()
- To: Fernando Nasser <fnasser at cygnus dot com>
- Subject: Re: [rfc] asprintf() -> xasprintf()
- From: Michael Snyder <msnyder at redhat dot com>
- Date: Tue, 14 Nov 2000 10:04:09 -0800
- CC: rearnsha at arm dot com, "Frank Ch. Eigler" <fche at redhat dot com>, Andrew Cagney <ac131313 at cygnus dot com>, GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- References: <200011141607.QAA28274@cam-mail2.cambridge.arm.com> <3A1165E6.99832836@cygnus.com>
Fernando Nasser wrote:
>
> Richard Earnshaw wrote:
> >
> > fche@redhat.com said:
> > > Fernando Nasser <fnasser@cygnus.com> writes:
> > > : Good catch. No more memory would cause an attempt to free NULL. :
> > > (Have you ever considered a FREE macro that tests for NULL pointers?
> > > [...]
> >
> > > free(NULL) is defined in even old standards to be a no-op.
> >
> > Then somebody had better tell sunos that: I don't think it was listening
> > :-)
> >
> > R.
> >
> > free(NULL) is not defined on older machines -- it came in with ANSI.
>
> Well, we did move GDB to ANSI, but I don't fell comfortable just assuming that
> all free() implementations are already compliant.
Not even all ANSI free impls?