Skip to content

Conversation

@timholzhey
Copy link

@timholzhey timholzhey commented Oct 12, 2025

Closes #25546
Closes #22045
Closes #23506
Closes #14905

This code now compiles correctly:

var arr: [1]u8 = .{0};
const arr_c_ptr = @as([*c][1]u8, &arr);
arr_c_ptr.*[0] = 1;

For pointer address calculation, [*c]arr[idx] can be treated a single-item pointer *arr[idx]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants