aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cparser/pre_parser.mly1
-rw-r--r--test/regression/parsing.c17
2 files changed, 18 insertions, 0 deletions
diff --git a/cparser/pre_parser.mly b/cparser/pre_parser.mly
index d6a4a21c..21008f1c 100644
--- a/cparser/pre_parser.mly
+++ b/cparser/pre_parser.mly
@@ -665,6 +665,7 @@ direct_declarator:
| i = declarator_identifier
{ set_id_type i VarId; (i, Decl_ident) }
| LPAREN save_context x = declarator RPAREN
+ { x }
| x = direct_declarator LBRACK type_qualifier_list? optional(assignment_expression, RBRACK)
{ match snd x with
| Decl_ident -> (fst x, Decl_other)
diff --git a/test/regression/parsing.c b/test/regression/parsing.c
index f8ba2a73..2d48687b 100644
--- a/test/regression/parsing.c
+++ b/test/regression/parsing.c
@@ -162,6 +162,23 @@ void (*krk(a, b, c))(int)
int hhh(int());
+int (testparen)(int T) {
+ return T;
+}
+
+int (testparen2(int T)) {
+ return T;
+}
+
+int ((testparen3)(int T)) {
+ return T;
+}
+
+int ((((((((((testparen10))))))))))(int T) {
+ return T;
+}
+
+
int main () {
f(g);
i();