Different behaviour of gcc and g++ (egcs-1.1.1 release)
Joe Buck
jbuck@Synopsys.COM
Wed Mar 31 23:46:00 GMT 1999
> > From: Carlo Wood <carlo@runaway.xs4all.nl>
> > Date: Wed, 3 Mar 1999 14:38:38 +0100 (CET)
>
> > the following very simple C program does compile as C++ program,
> > but the C compiler refuses to compile it. Is this a bug?
>
> Yes, GNU C should be forward compatible with future ISO C standards
> and in a future ISO C standard they will fix this. The the ISO C++
> Standard for the fixed semantics.
You could make a good argument that GNU C should accept the example
(with warnings for -ansi or -pedantic). This is basically a mistake
in the C standard that was corrected in the C++ standard (and will
almost certainly be fixed in C9X).
More information about the Gcc
mailing list