0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/test/compile_errors.zig

7333 lines
230 KiB

separate std.Target and std.zig.CrossTarget Zig now supports a more fine-grained sense of what is native and what is not. Some examples: This is now allowed: -target native Different OS but native CPU, default Windows C ABI: -target native-windows This could be useful for example when running in Wine. Different CPU but native OS, native C ABI. -target x86_64-native -mcpu=skylake Different C ABI but otherwise native target: -target native-native-musl -target native-native-gnu Lots of breaking changes to related std lib APIs. Calls to getOs() will need to be changed to getOsTag(). Calls to getArch() will need to be changed to getCpuArch(). Usage of Target.Cross and Target.Native need to be updated to use CrossTarget API. `std.build.Builder.standardTargetOptions` is changed to accept its parameters as a struct with default values. It now has the ability to specify a whitelist of targets allowed, as well as the default target. Rather than two different ways of collecting the target, it's now always a string that is validated, and prints helpful diagnostics for invalid targets. This feature should now be actually useful, and contributions welcome to further improve the user experience. `std.build.LibExeObjStep.setTheTarget` is removed. `std.build.LibExeObjStep.setTarget` is updated to take a CrossTarget parameter. `std.build.LibExeObjStep.setTargetGLibC` is removed. glibc versions are handled in the CrossTarget API and can be specified with the `-target` triple. `std.builtin.Version` gains a `format` method.
2020-02-26 01:18:23 -05:00
2020-03-20 22:23:51 +01:00
2020-03-09 12:31:36 +02:00
2020-03-09 18:38:54 +02:00
2020-03-09 12:31:36 +02:00
2020-03-09 18:38:54 +02:00
2020-03-09 12:31:36 +02:00
2020-03-12 16:46:16 +02:00
2020-01-15 20:40:56 +02:00
2020-01-15 23:05:52 +02:00
2020-01-16 22:48:01 +02:00
2020-01-16 22:48:01 +02:00
2020-01-15 20:40:56 +02:00
2020-01-13 21:45:16 +01:00
2019-12-17 00:24:23 +02:00
2019-12-17 00:24:23 +02:00
2019-12-17 00:24:23 +02:00
2020-03-10 22:46:19 +02:00
2019-12-17 00:24:23 +02:00
2019-12-12 18:26:12 +02:00
2019-12-12 18:26:12 +02:00
2020-03-15 13:05:24 +10:00
2020-03-15 13:05:24 +10:00
2019-12-05 16:55:32 -05:00
2019-12-05 17:37:29 -05:00
2019-12-05 16:55:32 -05:00
2019-12-05 17:37:29 -05:00
2019-12-05 16:55:32 -05:00
2019-12-06 14:52:09 -05:00
2019-12-05 17:37:29 -05:00
2020-01-13 08:49:32 +01:00
2019-12-05 16:55:32 -05:00
2019-11-20 11:46:04 +01:00
2019-11-20 11:46:04 +01:00
2019-12-06 14:52:09 -05:00
separate std.Target and std.zig.CrossTarget Zig now supports a more fine-grained sense of what is native and what is not. Some examples: This is now allowed: -target native Different OS but native CPU, default Windows C ABI: -target native-windows This could be useful for example when running in Wine. Different CPU but native OS, native C ABI. -target x86_64-native -mcpu=skylake Different C ABI but otherwise native target: -target native-native-musl -target native-native-gnu Lots of breaking changes to related std lib APIs. Calls to getOs() will need to be changed to getOsTag(). Calls to getArch() will need to be changed to getCpuArch(). Usage of Target.Cross and Target.Native need to be updated to use CrossTarget API. `std.build.Builder.standardTargetOptions` is changed to accept its parameters as a struct with default values. It now has the ability to specify a whitelist of targets allowed, as well as the default target. Rather than two different ways of collecting the target, it's now always a string that is validated, and prints helpful diagnostics for invalid targets. This feature should now be actually useful, and contributions welcome to further improve the user experience. `std.build.LibExeObjStep.setTheTarget` is removed. `std.build.LibExeObjStep.setTarget` is updated to take a CrossTarget parameter. `std.build.LibExeObjStep.setTargetGLibC` is removed. glibc versions are handled in the CrossTarget API and can be specified with the `-target` triple. `std.builtin.Version` gains a `format` method.
2020-02-26 01:18:23 -05:00
2019-11-24 18:10:31 -05:00
2019-11-24 18:10:31 -05:00
2020-03-10 22:46:19 +02:00
2019-11-24 02:14:21 -05:00
2019-11-14 03:26:33 -05:00
2019-11-24 02:14:21 -05:00
2019-11-14 03:26:33 -05:00
2020-04-27 23:46:09 -06:00
2020-04-27 23:46:09 -06:00
2019-08-23 09:33:33 -06:00
2019-08-23 09:33:33 -06:00
2019-08-23 09:33:33 -06:00
2019-08-23 09:33:33 -06:00
2019-08-23 09:33:33 -06:00
2019-08-23 09:33:33 -06:00
2019-08-23 09:33:33 -06:00
2019-08-23 09:33:33 -06:00
2019-08-23 09:33:33 -06:00
2019-08-23 09:33:33 -06:00
2019-11-06 23:25:57 -05:00
2020-04-07 15:24:49 +03:00
2019-11-06 23:25:57 -05:00
2020-04-07 15:24:49 +03:00
make std.net more portable * Delete `std.net.TmpWinAddr`. I don't think that was ever meant to be a real thing. * Delete `std.net.OsAddress`. This abstraction was not helpful. * Rename `std.net.Address` to `std.net.IpAddress`. It is now an extern union of IPv4 and IPv6 addresses. * Move `std.net.parseIp4` and `std.net.parseIp6` to the `std.net.IpAddress` namespace. They now return `IpAddress` instead of `u32` and `std.net.Ip6Addr`, which is deleted. * Add `std.net.IpAddress.parse` which accepts a port and parses either an IPv4 or IPv6 address. * Add `std.net.IpAddress.parseExpectingFamily` which additionally accepts a `family` parameter. * `std.net.IpAddress.initIp4` and `std.net.IpAddress.initIp6` are improved to directly take the address fields instead of a weird in-between type. * `std.net.IpAddress.port` is renamed to `std.net.IpAddress.getPort`. * Added `std.net.IpAddress.setPort`. * `os.sockaddr` struct on all targets is improved to match the corresponding system struct. Previously I had made it a union of sockaddr_in, sockaddr_in6, and sockaddr_un. The new abstraction for this is now `std.net.IpAddress`. * `os.sockaddr` and related bits are added for Windows. * `os.sockaddr` and related bits now have the `zero` fields default to zero initialization, and `len` fields default to the correct size. This is enough to abstract the differences across targets, and so no more switch on the target OS is needed in `std.net.IpAddress`. * Add the missing `os.sockaddr_un` on FreeBSD and NetBSD. * `std.net.IpAddress.initPosix` now takes a pointer to `os.sockaddr`.
2019-10-30 19:27:42 -04:00
2019-11-06 23:25:57 -05:00
separate std.Target and std.zig.CrossTarget Zig now supports a more fine-grained sense of what is native and what is not. Some examples: This is now allowed: -target native Different OS but native CPU, default Windows C ABI: -target native-windows This could be useful for example when running in Wine. Different CPU but native OS, native C ABI. -target x86_64-native -mcpu=skylake Different C ABI but otherwise native target: -target native-native-musl -target native-native-gnu Lots of breaking changes to related std lib APIs. Calls to getOs() will need to be changed to getOsTag(). Calls to getArch() will need to be changed to getCpuArch(). Usage of Target.Cross and Target.Native need to be updated to use CrossTarget API. `std.build.Builder.standardTargetOptions` is changed to accept its parameters as a struct with default values. It now has the ability to specify a whitelist of targets allowed, as well as the default target. Rather than two different ways of collecting the target, it's now always a string that is validated, and prints helpful diagnostics for invalid targets. This feature should now be actually useful, and contributions welcome to further improve the user experience. `std.build.LibExeObjStep.setTheTarget` is removed. `std.build.LibExeObjStep.setTarget` is updated to take a CrossTarget parameter. `std.build.LibExeObjStep.setTargetGLibC` is removed. glibc versions are handled in the CrossTarget API and can be specified with the `-target` triple. `std.builtin.Version` gains a `format` method.
2020-02-26 01:18:23 -05:00
2019-08-26 12:43:36 -04:00
2019-12-23 21:52:06 +01:00
2019-12-23 21:52:06 +01:00
2019-08-29 22:44:07 -04:00
2019-08-26 12:43:36 -04:00
2019-08-26 12:43:36 -04:00
2019-08-15 14:05:12 -04:00
2019-08-15 14:05:12 -04:00
2019-12-23 21:52:06 +01:00
2019-07-02 16:52:55 -04:00
2019-07-02 16:52:55 -04:00
2019-07-02 16:52:55 -04:00
2019-11-24 02:14:21 -05:00
2019-08-29 22:44:07 -04:00
2019-08-29 22:44:07 -04:00
2019-12-23 21:52:06 +01:00
separate std.Target and std.zig.CrossTarget Zig now supports a more fine-grained sense of what is native and what is not. Some examples: This is now allowed: -target native Different OS but native CPU, default Windows C ABI: -target native-windows This could be useful for example when running in Wine. Different CPU but native OS, native C ABI. -target x86_64-native -mcpu=skylake Different C ABI but otherwise native target: -target native-native-musl -target native-native-gnu Lots of breaking changes to related std lib APIs. Calls to getOs() will need to be changed to getOsTag(). Calls to getArch() will need to be changed to getCpuArch(). Usage of Target.Cross and Target.Native need to be updated to use CrossTarget API. `std.build.Builder.standardTargetOptions` is changed to accept its parameters as a struct with default values. It now has the ability to specify a whitelist of targets allowed, as well as the default target. Rather than two different ways of collecting the target, it's now always a string that is validated, and prints helpful diagnostics for invalid targets. This feature should now be actually useful, and contributions welcome to further improve the user experience. `std.build.LibExeObjStep.setTheTarget` is removed. `std.build.LibExeObjStep.setTarget` is updated to take a CrossTarget parameter. `std.build.LibExeObjStep.setTargetGLibC` is removed. glibc versions are handled in the CrossTarget API and can be specified with the `-target` triple. `std.builtin.Version` gains a `format` method.
2020-02-26 01:18:23 -05:00
2020-04-27 23:46:09 -06:00
2019-02-18 18:11:30 -05:00
2019-12-23 21:52:06 +01:00
2019-02-18 18:11:30 -05:00
2020-03-08 19:18:06 +11:00
2020-04-27 23:14:40 -06:00
2020-04-27 23:14:40 -06:00
2019-11-06 23:25:57 -05:00
2019-08-26 12:43:36 -04:00
2019-01-20 14:09:17 -05:00
2019-01-20 14:09:17 -05:00
breaking API changes to all readInt/writeInt functions & more * add `@bswap` builtin function. See #767 * comptime evaluation facilities are improved to be able to handle a `@ptrCast` with a backing array. * `@truncate` allows "truncating" a u0 value to any integer type, and the result is always comptime known to be `0`. * when specifying pointer alignment in a type expression, the alignment value of pointers which do not have addresses at runtime is ignored, and always has the default/ABI alignment * threw in a fix to freebsd/x86_64.zig to update syntax from language changes * some improvements are pending #863 closes #638 closes #1733 std lib API changes * io.InStream().readIntNe renamed to readIntNative * io.InStream().readIntLe renamed to readIntLittle * io.InStream().readIntBe renamed to readIntBig * introduced io.InStream().readIntForeign * io.InStream().readInt has parameter order changed * io.InStream().readVarInt has parameter order changed * io.InStream().writeIntNe renamed to writeIntNative * introduced io.InStream().writeIntForeign * io.InStream().writeIntLe renamed to writeIntLittle * io.InStream().writeIntBe renamed to writeIntBig * io.InStream().writeInt has parameter order changed * mem.readInt has different parameters and semantics * introduced mem.readIntNative * introduced mem.readIntForeign * mem.readIntBE renamed to mem.readIntBig and different API * mem.readIntLE renamed to mem.readIntLittle and different API * introduced mem.readIntSliceNative * introduced mem.readIntSliceForeign * introduced mem.readIntSliceLittle * introduced mem.readIntSliceBig * introduced mem.readIntSlice * mem.writeInt has different parameters and semantics * introduced mem.writeIntNative * introduced mem.writeIntForeign * mem.writeIntBE renamed to mem.readIntBig and different semantics * mem.writeIntLE renamed to mem.readIntLittle and different semantics * introduced mem.writeIntSliceForeign * introduced mem.writeIntSliceNative * introduced mem.writeIntSliceBig * introduced mem.writeIntSliceLittle * introduced mem.writeIntSlice * removed mem.endianSwapIfLe * removed mem.endianSwapIfBe * removed mem.endianSwapIf * added mem.littleToNative * added mem.bigToNative * added mem.toNative * added mem.nativeTo * added mem.nativeToLittle * added mem.nativeToBig
2018-12-12 20:19:46 -05:00
2020-03-26 14:07:19 -04:00
2019-05-08 16:06:34 -04:00
2018-09-05 18:01:48 -04:00
2018-09-05 18:01:48 -04:00
2018-09-05 18:01:48 -04:00
2019-11-06 23:25:57 -05:00
2018-09-05 18:01:48 -04:00
2018-09-05 18:01:48 -04:00
2018-09-05 18:01:48 -04:00
2018-09-05 18:01:48 -04:00
2019-08-11 19:53:10 -04:00
2019-08-11 19:53:10 -04:00
2019-12-23 21:52:06 +01:00
2018-07-07 00:25:32 -04:00
2018-07-07 00:25:32 -04:00
2018-07-07 00:25:32 -04:00
2020-04-27 23:14:40 -06:00
2019-11-06 23:25:57 -05:00
2018-04-21 02:00:14 -04:00
2018-04-21 02:00:14 -04:00
2019-08-11 19:53:10 -04:00
2019-08-11 19:53:10 -04:00
2019-08-11 19:53:10 -04:00
2019-08-11 19:53:10 -04:00
2019-11-24 02:14:21 -05:00
2019-11-24 02:14:21 -05:00
2018-02-08 02:08:45 -05:00
2018-02-08 02:08:45 -05:00
2019-11-06 23:25:57 -05:00
2020-01-06 18:20:31 -05:00
2019-12-23 21:52:06 +01:00
2019-12-23 21:52:06 +01:00
2019-12-23 21:52:06 +01:00
2019-07-16 11:50:00 -04:00
2019-07-16 11:50:00 -04:00
2019-12-23 21:52:06 +01:00
2020-01-06 18:20:31 -05:00
2019-11-24 02:14:21 -05:00
2019-11-06 23:25:57 -05:00
2019-11-06 23:25:57 -05:00
2019-11-06 23:25:57 -05:00
2019-11-06 23:25:57 -05:00
2019-11-06 23:25:57 -05:00
2019-11-06 23:25:57 -05:00
2019-11-06 23:25:57 -05:00
2019-06-25 19:03:56 -04:00
2019-11-06 23:25:57 -05:00
2019-12-23 21:52:06 +01:00
2019-12-23 21:52:06 +01:00
2018-02-08 02:08:45 -05:00
2018-01-31 22:48:40 -05:00
2019-11-06 23:25:57 -05:00
2019-11-06 23:25:57 -05:00
2019-11-06 23:25:57 -05:00
2019-11-06 23:25:57 -05:00
2019-06-25 19:03:56 -04:00
2020-04-27 23:14:40 -06:00
2019-11-06 23:25:57 -05:00
2017-09-05 18:51:07 -04:00
2017-09-05 18:51:07 -04:00
2019-06-25 19:03:56 -04:00
2019-06-25 19:03:56 -04:00
2019-06-25 19:03:56 -04:00
2019-06-25 19:03:56 -04:00
2019-06-25 19:03:56 -04:00
2019-06-25 19:03:56 -04:00
2019-06-25 19:03:56 -04:00
2019-06-25 19:03:56 -04:00
2019-06-25 19:03:56 -04:00
2020-04-27 23:14:40 -06:00
2020-04-07 15:24:49 +03:00
2019-06-25 19:03:56 -04:00
2019-06-25 19:03:56 -04:00
2019-11-06 23:25:57 -05:00
2017-10-02 22:00:42 -04:00
2017-10-02 22:00:42 -04:00
2017-10-02 22:00:42 -04:00
2020-01-06 18:20:31 -05:00
2017-10-02 22:00:42 -04:00
2017-10-02 22:00:42 -04:00
2017-10-02 22:00:42 -04:00
2017-10-02 22:00:42 -04:00
2017-10-02 22:00:42 -04:00
2017-10-02 22:00:42 -04:00
2017-10-23 22:33:00 -04:00
2017-10-23 22:33:00 -04:00
2019-06-25 19:03:56 -04:00
2020-04-27 23:14:40 -06:00
2019-11-24 02:14:21 -05:00
2017-12-04 00:56:27 -05:00
2019-08-26 22:38:45 -04:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-04 00:56:27 -05:00
2017-12-05 18:09:22 -05:00
2017-12-05 18:09:22 -05:00
2017-12-05 18:09:22 -05:00
2018-05-01 13:00:39 +03:00
2018-05-01 13:00:39 +03:00
2018-05-01 13:00:39 +03:00
2018-05-01 13:09:34 +03:00
2019-12-23 21:52:06 +01:00
2019-06-25 19:03:56 -04:00
2019-06-25 19:03:56 -04:00
2019-02-13 12:19:08 +01:00
2020-04-27 23:46:09 -06:00
2019-02-13 12:19:08 +01:00
2020-04-27 23:46:09 -06:00
2019-02-13 12:19:08 +01:00
2020-04-27 23:46:09 -06:00
2019-07-21 10:41:43 -05:00
2019-07-21 10:41:43 -05:00
2020-04-27 23:14:40 -06:00
2020-03-09 19:36:15 +01:00
2020-03-09 19:36:15 +01:00
2020-03-09 19:36:15 +01:00
2020-04-27 23:14:40 -06:00
2020-03-09 19:36:15 +01:00
2020-03-09 19:36:15 +01:00
2020-03-09 19:36:15 +01:00
2020-04-07 15:24:49 +03:00
2020-04-07 15:24:49 +03:00