aboutsummaryrefslogtreecommitdiffhomepage
path: root/c/c.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-12-13 17:34:15 +0100
committerlemon <lsof@mailbox.org>2025-12-13 17:39:08 +0100
commit6c7cdc537b7b341f9ca25a3e8b61de46c99840e7 (patch)
tree1cbbcee4cdace1c7f16d78ee46755d9cb825c754 /c/c.c
parentfc7048a0c4c4b9647f032edfba74f7d7a62335e1 (diff)
c: handle more static eval edgecases for int -> ptr
sqlite3 was falling back to `((void*)&((char*)0)[X])` for INT_TO_PTR, which this handles now.
Diffstat (limited to 'c/c.c')
-rw-r--r--c/c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/c/c.c b/c/c.c
index d79439a..5ff2041 100644
--- a/c/c.c
+++ b/c/c.c
@@ -788,7 +788,7 @@ ppostfixopers(struct comp *cm, struct expr *ex)
rhs = commaexpr(cm);
span = ex->span;
if (!joinspan(&span.ex, tk.span.ex) || !joinspan(&span.ex, ex->span.ex)
- || (peek(cm, &tk2), !joinspan(&span.ex, tk.span.ex)))
+ || (peek(cm, &tk), !joinspan(&span.ex, tk.span.ex)))
span = tk.span;
expect(cm, ']', NULL);