re PR c/20672 (New C parser doesn't check whether functions that end files are closed properly)
PR c/20672 * c-parser.c (c_parser_compound_statement_nostart): Give error message for EOF instead of just setting parser->error. testsuite: * gcc.dg/pr20672-1.c: New test. From-SVN: r97197
This commit is contained in:
parent
0fd20f3614
commit
d1edc39366
@ -1,3 +1,9 @@
|
||||
2005-03-29 Joseph S. Myers <joseph@codesourcery.com>
|
||||
|
||||
PR c/20672
|
||||
* c-parser.c (c_parser_compound_statement_nostart): Give error
|
||||
message for EOF instead of just setting parser->error.
|
||||
|
||||
2005-03-29 Dorit Naishlos <dorit@il.ibm.com>
|
||||
|
||||
* tree-vectorizer.c (slpeel_update_phi_nodes_for_guard): Removed.
|
||||
|
@ -3238,7 +3238,7 @@ c_parser_compound_statement_nostart (c_parser *parser)
|
||||
location_t loc = c_parser_peek_token (parser)->location;
|
||||
if (c_parser_next_token_is (parser, CPP_EOF))
|
||||
{
|
||||
parser->error = true;
|
||||
c_parser_error (parser, "expected declaration or statement");
|
||||
return;
|
||||
}
|
||||
if (c_parser_next_token_is_keyword (parser, RID_CASE)
|
||||
|
@ -1,3 +1,8 @@
|
||||
2005-03-29 Joseph S. Myers <joseph@codesourcery.com>
|
||||
|
||||
PR c/20672
|
||||
* gcc.dg/pr20672-1.c: New test.
|
||||
|
||||
2005-03-29 Dorit Naishlos <dorit@il.ibm.com>
|
||||
|
||||
* gfortran.dg/vect: New directory.
|
||||
|
7
gcc/testsuite/gcc.dg/pr20672-1.c
Normal file
7
gcc/testsuite/gcc.dg/pr20672-1.c
Normal file
@ -0,0 +1,7 @@
|
||||
/* EOF must cause an error inside a function, not just set parser->error.
|
||||
Bug 20672. */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "" } */
|
||||
int main(void)
|
||||
{
|
||||
int a; /* { dg-error "expected" } */
|
Loading…
Reference in New Issue
Block a user