Mail Archives: djgpp-workers/1999/10/11/09:17:16
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 -