mirror of
https://github.com/ziglang/zig.git
synced 2024-11-29 07:40:14 +00:00
fix noreturn function that may return.
we do not want undefined behavior here in --release-fast and --release-small modes
This commit is contained in:
parent
55685ae780
commit
1c22cb5e51
@ -82,9 +82,11 @@ pub fn panic(msg: []const u8, error_return_trace: ?*builtin.StackTrace) noreturn
|
||||
if (builtin.is_test) {
|
||||
@setCold(true);
|
||||
std.debug.panic("{}", msg);
|
||||
} else {
|
||||
unreachable;
|
||||
}
|
||||
if (builtin.os != .freestanding) {
|
||||
std.os.abort();
|
||||
}
|
||||
while (true) {}
|
||||
}
|
||||
|
||||
export fn memset(dest: ?[*]u8, c: u8, n: usize) ?[*]u8 {
|
||||
|
Loading…
Reference in New Issue
Block a user