This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Candidate fix for PR c/7353
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Mark Mitchell <mark at codesourcery dot com>,"Joseph S. Myers" <jsm28 at cam dot ac dot uk>,Richard Henderson <rth at redhat dot com>,"gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 1 Nov 2002 09:45:18 -0800
- Subject: Re: Candidate fix for PR c/7353
- References: <20021009165533.GA15970@codesourcery.com> <67840000.1034182761@warlock.codesourcery.com> <20021009182214.GC15970@codesourcery.com> <wvlk7jxpymj.fsf@prospero.cambridge.redhat.com>
On Fri, Nov 01, 2002 at 01:55:48AM -0500, Jason Merrill wrote:
> This patch causes us to no longer give an error for
>
> struct A {
> typedef int B = 0;
> };
Huh?
$ ./cc1 -quiet test.c
test.c:2: error: parse error before "typedef"
test.c:2: warning: no semicolon at end of struct or union
$ ./cc1plus -quiet test.c
test.c:2: error: ISO C++ forbids declaration of `B' with no type
Not the *best* diagnostics, but I don't feel it's worth trying to get
good diagnostics out of the old parser.
zw