Commit d1edc393 by Joseph Myers Committed by Joseph Myers

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
parent 0fd20f36
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)
......
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.
......
/* 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" } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment