Fix C/should_fail/decl_without_name.c.
authorChristoph Mallon <christoph.mallon@gmx.de>
Sun, 6 Feb 2011 07:51:04 +0000 (07:51 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sun, 6 Feb 2011 07:51:04 +0000 (07:51 +0000)
[r28321]

parser.c

index c99427c..8eaf7d4 100644 (file)
--- 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;
        }