Should std.process.exit calls be treated as return/panic alike statements?

I’m surprised that the following code compiles.

const std = @import("std");

pub fn main() !void {
    std.process.exit(0);
    std.debug.print("bye\n", .{}); // no unreachable code error for this line
}

See https://github.com/ziglang/zig/issues/11073 and the linked issues

2 Likes