Andrew Kelley

Results 402 issues of Andrew Kelley

Add a `--coverage` argument to `zig test` and have it generate a nice report.

enhancement
stage2

Reproduction: First, revert 1b1c70ce381cc3c76517c846eafcd3425a40ce9c. ``` $ stage3/bin/zig build test-cases -Denable-llvm compiler [669/1112] llvm/shift_right_plus_left (llvm, x86_64-linux) [2/2] update [2/3] ... panic: attempt to unwrap error: GenericPoison /home/andy/dev/zig/src/type.zig:31:23: 0x30257b4 in zigTypeTagOrPoison (test)...

bug
stage2
regression

In theory we could sometimes take advantage of SIGFPE for our integer division by zero safety check: ``` test "integer division by zero" { @setRuntimeSafety(false); var x: i32 = 10;...

enhancement
optimization
stage2

``` [nix-shell:~/dev/zig/build-release]$ stage3/bin/zig build test-run-translated-c /home/andy/.cache/zig/o/298d9a868ea257548e164645862426f6/source.zig:450:44: error: incompatible types: '*const c_int' and 'c_int' if (&add(@as(c_int, 1), @as(c_int, 2)) != @as(c_int, 3)) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /home/andy/.cache/zig/o/298d9a868ea257548e164645862426f6/source.zig:450:9: note: type '*const c_int' here if...

bug
stage2
translate-c

Currently we have `@Vector` for this, however, see #5207 and #6209. Array syntax is `[N]T`. This is a proposal for SIMD vector syntax to be `[|N|]T` instead of `@Vector(N, T)`....

proposal

Extracted from #12220. ``` $ stage3/bin/zig build-exe empty.zig -target x86_64-freestanding-none -mcpu=x86_64+soft_float thread 427475 panic: Illegal instruction at address 0x5c6d154 ``` As pointed out in https://github.com/llvm/llvm-project/issues/56351#issuecomment-1173063759, `+x87` and `+soft_float` is a...

enhancement
contributor friendly
stage2

This issue is split from #287. Now that we have result location semantics, the following code does not introduce an intermediate value with a copy: ```zig const Point = struct...

proposal

```zig const xxx = struct { bar: u8, pub fn bar(self: *const xxx) void {} }; pub fn main() !void { var x: xxx = undefined; x.bar(); } ``` ```...

enhancement
stage2
error message