From f694cc443ccc17a494cd195151882ab5e491bbb2 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 22 Oct 2026 13:59:48 +0000 Subject: feat(codegen): accept ^x of C values as variadic arguments In a variadic EXTERN position, ^x now passes the address of x as a plain pointer when x has a C type or is a C struct, like C's f(n, &x). The address of a pseudocode-typed value keeps the "must be a C value" error. Co-Authored-By: Claude Opus 5.5 --- tests/i/extern-c-struct/program.cps | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/i/extern-c-struct/program.cps') diff --git a/tests/i/extern-c-struct/program.cps b/tests/i/extern-c-struct/program.cps index 62370d3..210e10d 100644 --- a/tests/i/extern-c-struct/program.cps +++ b/tests/i/extern-c-struct/program.cps @@ -43,3 +43,4 @@ CALL bump_counter(^C) OUTPUT N CALL get_shared(^R) OUTPUT R^.Tag, " ", R^.Count +OUTPUT sum_counts((C_INT)2, ^S, P) -- cgit v1.3.1-4-g156e