From: pavenis AT lanet DOT lv Message-ID: To: Eli Zaretskii , djgpp-workers AT delorie DOT com, DJ Delorie Date: Mon, 11 Oct 1999 15:33:05 +0300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: xmalloc and xfree References: In-reply-to: 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