This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Candidate fix for PR c/7353


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]