delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/10/11/09:17:16

From: pavenis AT lanet DOT lv
Message-ID: <B0000104719@stargate.astr.lu.lv>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, djgpp-workers AT delorie DOT com,
DJ Delorie <dj AT delorie DOT com>
Date: Mon, 11 Oct 1999 15:33:05 +0300
MIME-Version: 1.0
Subject: Re: xmalloc and xfree
References: <Pine DOT A41 DOT 4 DOT 05 DOT 9910110951410 DOT 100374-100000 AT ieva01 DOT lanet DOT lv>
In-reply-to: <Pine.SUN.3.91.991011141246.28578L-100000@is>
X-mailer: Pegasus Mail for Win32 (v3.12a)
Reply-To: djgpp-workers AT delorie DOT com

On 11 Oct 99, at 14:17, Eli Zaretskii wrote:

> 
> On Mon, 11 Oct 1999, Andris Pavenis wrote:
> > 
> > Yes, now -ansi-pedantic is the default for C++ compiler. Current C++ 
> > standard does not permit implicit declarations. Of course You can use
> > command line option -fpermissive to get warnings instead of errors for 
> > some standard violations. But I suggest to fix Your source better.
> 
> Perhaps we should uncomment the prototype of xmalloc and friends in 
> stdlib.h, but only #ifdef __cplusplus.
> 
> Comments?

Should we have them there at all. 

> Btw, isn't that -ansi-pedantic default of C++ a good reason to complain 
> about to the GCC maintainers?  As far as I understand, that means, in 
> particular, that C++ programs will not see prototypes of non-ANSI 
> functions in our C headers, right?  I guess there are other calamities 
> as well.

Not true. Corresponding defines are not added when preprocessing
C++ sources. So preprocessor knows nothing about this C++ compiler
feature. 

Also one always can use command line option -fpermissive to push 
through source which violates C++ standard.
 
> Or maybe we should turn that switch off in specs?

Some time ago there were discussion about one related hack (adding
-fpermissive in specs by default) I suggested in specs in gcc mailing 
list. The discussion convinced me not to do similar things.

Andris

- Raw text -


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