aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2026-01-09 13:55:05 +0100
committerlemon <lsof@mailbox.org>2026-01-09 13:55:05 +0100
commit5d088fa24f5e9739c3cd184f9df840e3486fcd51 (patch)
treee620fd8a488698a052d5de4e347a5ba7bf79d025
parentdafeb309f4b01178add595b7435669ea2899d9d7 (diff)
c: allow 'register' in func parameter
-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;