This is the mail archive of the
mailing list for the GCC project.
Re: Different behaviour of gcc and g++ (egcs-1.1.1 release)
- To: mrs at wrs dot com (Mike Stump)
- Subject: Re: Different behaviour of gcc and g++ (egcs-1.1.1 release)
- From: Joe Buck <jbuck at Synopsys dot COM>
- Date: Wed, 3 Mar 99 14:14:08 PST
- Cc: carlo at runaway dot xs4all dot nl, egcs-bugs at cygnus dot com, egcs at cygnus dot com
> > From: Carlo Wood <email@example.com>
> > 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).