aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--c/c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/c/c.c b/c/c.c
index f0b4c1e..3b7264e 100644
--- a/c/c.c
+++ b/c/c.c
@@ -2336,7 +2336,7 @@ declspec(struct declstate *st, struct comp *cm, struct span *pspan)
arith = arith ? arith : KINT;
}
- if ((!properdecl && scls) || (scls == SCAUTO && st->kind == DTOPLEVEL))
+ if ((!properdecl && scls && !(st->kind == DFUNCPARAM && scls == SCREGISTER)) || (scls == SCAUTO && st->kind == DTOPLEVEL))
error(&tk.span, "storage class specifier %'tk is not allowed here", &tk);
else
st->scls |= scls;