aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/c.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2026-04-20 16:39:48 +0200
committerlemon <lsof@mailbox.org>2026-04-20 16:39:55 +0200
commit94aefdc760b1a7f77fe3a64d2ebf8c13645a49d0 (patch)
tree17f35417a73c5db054fbe619a7191696ef26e8e6 /src/c.c
parentf3fee781e966afaee558641662021cf5e4559616 (diff)
frontend: embed <limits.h>, fix asm names
Diffstat (limited to 'src/c.c')
-rw-r--r--src/c.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/c.c b/src/c.c
index 3ef9cfc..4ff42b4 100644
--- a/src/c.c
+++ b/src/c.c
@@ -2955,10 +2955,10 @@ pdecl(DeclState *st, CComp *cm) {
if (st->kind == DTOPLEVEL || st->kind == DFUNCVAR) {
while (attrspec(cm, &st->attr)) ;
if (match(cm, NULL, TKW__asm__) && expect(cm, '(', NULL)) {
- peek(cm, &tk);
- if (expect(cm, TKSTRLIT, "asm symbol name")) {
+ if (peek(cm, NULL) == TKSTRLIT) {
+ lex(cm, &tk);
decl.sym = intern_(tk.s, tk.len);
- }
+ } else expect(cm, TKSTRLIT, "asm symbol name");
expect(cm, ')', NULL);
}
while (attrspec(cm, &st->attr)) ;