diff options
author | Joseph Myers <joseph@codesourcery.com> | 2009-02-13 01:00:24 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2009-02-13 01:00:24 +0000 |
commit | f007042e20e61d8e9b6472b47bb4005bc91baec0 (patch) | |
tree | aaac573acd9b2594848c4d9b343bb20a655dc0f7 /gcc/c-parser.c | |
parent | f3eb9681f02a415755730a84f4a4174fbf2e2b27 (diff) | |
download | gcc-f007042e20e61d8e9b6472b47bb4005bc91baec0.tar.gz |
re PR c/35444 (ICE with invalid function declaration)
PR c/35444
* c-parser.c (c_parser_parms_list_declarator): Discard pending
sizes on syntax error after some arguments have been parsed.
testsuite:
* gcc.dg/noncompile/pr35444-1.c, gcc.dg/noncompile/pr35444-2.c:
New tests.
From-SVN: r144149
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r-- | gcc/c-parser.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 199a5a72f3f..e09c2c17161 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -2578,6 +2578,7 @@ c_parser_parms_list_declarator (c_parser *parser, tree attrs) "expected %<;%>, %<,%> or %<)%>")) { c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, NULL); + get_pending_sizes (); return NULL; } if (c_parser_next_token_is (parser, CPP_ELLIPSIS)) @@ -2605,6 +2606,7 @@ c_parser_parms_list_declarator (c_parser *parser, tree attrs) { c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + get_pending_sizes (); return NULL; } } |