aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--decl.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/decl.c b/decl.c
index 9e89cea..8b5bfad 100644
--- a/decl.c
+++ b/decl.c
@@ -480,16 +480,18 @@ declaratortypes(struct scope *s, struct list *result, char **name, bool allowabs
switch (tok.kind) {
case TLPAREN:
next();
- switch (tok.kind) {
- case TMUL:
- case TLPAREN:
- break;
- case TIDENT:
- if (!allowabstract || !istypename(s, tok.lit))
+ if (allowabstract) {
+ switch (tok.kind) {
+ case TMUL:
+ case TLPAREN:
break;
- /* fallthrough */
- default:
- goto func;
+ case TIDENT:
+ if (!istypename(s, tok.lit))
+ break;
+ /* fallthrough */
+ default:
+ goto func;
+ }
}
declaratortypes(s, result, name, allowabstract);
expect(TRPAREN, "after parenthesized declarator");