Date: Tue, 12 Oct 1999 09:31:34 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: DJ Delorie cc: djgpp-workers AT delorie DOT com Subject: Re: xmalloc and xfree In-Reply-To: <199910111721.NAA25761@envy.delorie.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 11 Oct 1999, DJ Delorie wrote: > I'm concerned that adding the prototype will cause more trouble than > it's worth. If C++ programs are supposed to use new/delete anyway, > why is the prototype needed at all? The prototype is needed because some user, like the one who started this thread on c.o.m.d., might use xmalloc. It's considered a Bad Idea in C++, but users should be entitled to compile their Bad Ideas and sustain the consequences. The difference between this case and the C case (where I do think the prototype should be invisible) is that (a) C programs compile and link while C++ programs do not, and (b) the potential problems from incompatible xmalloc prototypes in ported C++ programs should be very rare (assuming that Serious Programmers who write C++ programs that people would port know better than to use xmalloc).