From 5d088fa24f5e9739c3cd184f9df840e3486fcd51 Mon Sep 17 00:00:00 2001 From: lemon Date: Fri, 9 Jan 2026 13:55:05 +0100 Subject: c: allow 'register' in func parameter --- c/c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'c/c.c') 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; -- cgit v1.2.3