I built hello world from the first example language reference.
const std = @import("std");
pub fn main() !void {
const stdout = std.io.getStdOut().writer();
try stdout.print("Hello, {s}!\n", .{"world"});
}
I was stepping through the code when this line jumped into memset:
var bytes_written: DWORD = undefined;
This is from WriteFile in windows.zig in the standard library.
I thought zig didn't have any hidden control flow like this.
Why is setting a value to undefined causing memset to be called?