2010-10-30 Paolo Bonzini <bonzini@gnu.org>
commit71bb4bc6b34ed58a6c895d02f266f0181475fc4a
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 13 Nov 2010 10:01:33 +0000 (13 10:01 +0000)
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 13 Nov 2010 10:01:33 +0000 (13 10:01 +0000)
tree4fb6150727f97abf234833db07b615d4efb0a5f4
parentae5ead32be29f005d59ca2ef568489c1f524c69e
2010-10-30  Paolo Bonzini  <bonzini@gnu.org>

PR c/20385
* 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.

testsuite:
2010-11-13  Paolo Bonzini  <bonzini@gnu.org>

PR c/20385
* gcc.dg/decl-9.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166700 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/decl-9.c [new file with mode: 0644]