mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
backend=auto (now the default if backend is omitted) means to let the compiler pick whatever backend it wants as the default. This is important for platforms where we don't yet have a self-hosted backend, such as loongarch64. Also purge a bunch of redundant target=native.
31 lines
777 B
Zig
31 lines
777 B
Zig
extern "" var a: u32;
|
|
extern "" fn b() void;
|
|
|
|
extern "\x00" var c: u32;
|
|
extern "\x00" fn d() void;
|
|
|
|
test "" {}
|
|
test "\x00" {}
|
|
|
|
const e = @import("");
|
|
const f = @import("\x00");
|
|
|
|
comptime {
|
|
const @"" = undefined;
|
|
}
|
|
comptime {
|
|
const @"\x00" = undefined;
|
|
}
|
|
|
|
// error
|
|
//
|
|
// :1:8: error: library name cannot be empty
|
|
// :2:8: error: library name cannot be empty
|
|
// :4:8: error: library name cannot contain null bytes
|
|
// :5:8: error: library name cannot contain null bytes
|
|
// :7:6: error: empty test name must be omitted
|
|
// :8:6: error: test name cannot contain null bytes
|
|
// :10:19: error: import path cannot be empty
|
|
// :11:19: error: import path cannot contain null bytes
|
|
// :14:11: error: identifier cannot be empty
|
|
// :17:11: error: identifier cannot contain null bytes
|