mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-06-23 17:11:21 -04:00
2e3fac3626
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.
15 lines
357 B
Zig
15 lines
357 B
Zig
fn entry(a: *addrspace(.gs) i32) *i32 {
|
|
return a;
|
|
}
|
|
pub fn main() void {
|
|
_ = &entry;
|
|
}
|
|
|
|
// error
|
|
// output_mode=Exe
|
|
// target=x86_64-linux,x86_64-macos
|
|
//
|
|
// :2:12: error: expected type '*i32', found '*addrspace(.gs) i32'
|
|
// :2:12: note: address space 'gs' cannot cast into address space 'generic'
|
|
// :1:34: note: function return type declared here
|