From: Christoph Mallon Date: Sun, 6 Feb 2011 07:51:04 +0000 (+0000) Subject: Fix C/should_fail/decl_without_name.c. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=5742971ee2f77e40f1bdc781e36b08b7a3d7e82a;p=cparser Fix C/should_fail/decl_without_name.c. [r28321] --- diff --git a/parser.c b/parser.c index c99427c..8eaf7d4 100644 --- a/parser.c +++ b/parser.c @@ -3658,12 +3658,16 @@ ptr_operator_end: ; } rem_anchor_token(')'); expect(')', end_error); + } else if (!env->may_be_abstract) { + errorf(HERE, "declarator must have a name"); + goto error_out; } break; default: if (env->may_be_abstract) break; parse_error_expected("while parsing declarator", T_IDENTIFIER, '(', NULL); +error_out: eat_until_anchor(); return NULL; }