This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] detect unknown type names in declaration
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 13 Nov 2010 06:15:37 -0800
- Subject: Re: [PATCH] detect unknown type names in declaration
- References: <1288445090-8881-1-git-send-email-bonzini@gnu.org>
On Sat, Oct 30, 2010 at 6:24 AM, Paolo Bonzini <bonzini@gnu.org> wrote:
> This patch improves GCC error detection so that some cases of
> declarations with unknown type names are detected. ?This also
> allows GCC to do better on cascading errors, because the variables
> that are declared enter the symbol table.
>
> Bootstrapped/regtested x86_64-pc-linux-gnu, ok?
>
> 2010-10-30 ?Paolo Bonzini ?<bonzini@gnu.org>
>
> ? ? ? ?* c-parser.c (c_parser_next_token_starts_declaration): Rename to...
> ? ? ? ?(c_parser_next_tokens_start_declaration): ... this. ?Handle 2nd
> ? ? ? ?token lookahead.
> ? ? ? ?(c_parser_compound_statement_nostart, c_parser_label,
> ? ? ? ?c_parser_for_statement, c_parser_omp_for_loop): Adjust calls.
> ? ? ? ?(c_parser_declaration_or_fndef): Detect the case now matched by
> ? ? ? ?c_parser_next_tokens_start_declaration, give error and correct it.
>
This caused:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46462
H.J.