aboutsummaryrefslogtreecommitdiff
path: root/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'decl.c')
-rw-r--r--decl.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/decl.c b/decl.c
index 3ebf51a..35ba57a 100644
--- a/decl.c
+++ b/decl.c
@@ -462,8 +462,17 @@ declaratortypes(struct scope *s, struct list *result, char **name, bool allowabs
switch (tok.kind) {
case TLPAREN:
next();
- if (allowabstract && tok.kind != TMUL && (tok.kind != TIDENT || istypename(s, tok.lit)))
+ switch (tok.kind) {
+ case TMUL:
+ case TLPAREN:
+ break;
+ case TIDENT:
+ if (!allowabstract || !istypename(s, tok.lit))
+ break;
+ /* fallthrough */
+ default:
goto func;
+ }
declaratortypes(s, result, name, allowabstract);
expect(TRPAREN, "after parenthesized declarator");
break;