#error: cast increases pointer alignment
1 messages · Page 1 of 1 (latest)
1 messages · Page 1 of 1 (latest)
How would I force Zig to cast a u8 pointer to uint32_t pointer? I am getting the byte array from C (more specifically, shaderc compile output), and using it in another C struct (VkShaderModuleCreateInfo.pCode which is const uint32_t*)
@ptrCast(*u32, @alignCast(@alignOf(u32), ptr))
small nit: probably want [*]u32 instead