-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed as not planned
Labels
questionNo questions on the issue tracker, please.No questions on the issue tracker, please.
Description
Zig Version
0.13.0
Steps to Reproduce and Observed Behavior
Compile example program with zig build-obj cx_enum.zig
( #17570)
cx_enum.zig
:
const E = enum(comptime_int) {
message,
reached_urneachable,
accessed_out_of_bounds,
};
const U = union(E) {
message: []const u8,
reached_urneachable,
accessed_out_of_bounds: struct { idx: usize, end: usize },
};
fn f3(u: U) noreturn {
switch (u) {
.message => {},
.accessed_out_of_bounds => {},
.reached_urneachable => {},
}
@trap();
}
pub fn main() void {
f3(.{ .message = "ok" });
}
Output:
zig build-obj cx_enum.zig
[161] Semantic Analysis
[380] Semantic Analysis
[64] Code Generation
└─ cx_enum.f3
[380] Semantic Analysis
[64] Code Generation
└─ cx_enum.f3
[380] Semantic Analysis
[64] Code Generation
└─ cx_enum.f3
[380] Semantic Analysis
[64] Code Generation
└─ cx_enum.f3
[380] Semantic Analysis
[64] Code Generation
└─ cx_enum.f3
[380] Semantic Analysis
[380] Semantic Analysis
[64] Code Generation
└─ cx_enum.f3
return self.lowerBlock(inst, null, @ptrCast(self.air.extra[extra.end..][0..extra.data.body_len]));
^
[380] Semantic Analysis
[64] Code Generation
└─ cx_enum.f3
[380] Semantic Analysis
[64] Code Generation
└─ cx_enum.f3
[380] Semantic Analysis
[64] Code Generation
└─ cx_enum.f3
~/.local/share/projects/all/zig/src/link.zig:422:82: 0x5d19f48 in updateFunc (zig)
return @as(*tag.Type(), @fieldParentPtr("base", base)).updateFunc(module, func_index, air, liveness);
^
[380] Semantic Analysis
[64] Code Generation
└─ cx_enum.f3
~/.local/share/projects/all/zig/src/Compilation.zig:3406:42: 0x5aae6f8 in processOneJob (zig)
module.ensureFuncBodyAnalyzed(func) catch |err| switch (err) {
^
~/.local/share/projects/all/zig/src/Compilation.zig:3346:30: 0x58e3848 in performAllTheWork (zig)
try processOneJob(comp, work_item, main_progress_node);
^
~/.local/share/projects/all/zig/src/Compilation.zig:2133:31: 0x58df0df in update (zig)
try comp.performAllTheWork(main_progress_node);
^
[380] Semantic Analysis
[64] Code Generation
└─ cx_enum.f3
~/.local/share/projects/all/zig/src/main.zig:3416:17: 0x597b11c in buildOutputType (zig)
updateModule(comp, color, root_prog_node) catch |err| switch (err) {
^
~/.local/share/projects/all/zig/src/main.zig:271:31: 0x57c082e in mainArgs (zig)
return buildOutputType(gpa, arena, args, .run);
^
~/.local/share/projects/all/zig/src/main.zig:209:20: 0x57bdb45 in main (zig)
return mainArgs(gpa, arena, args);
^
~/.local/share/projects/all/zig/lib/std/start.zig:524:37: 0x57bd5eb in main (zig)
const result = root.main() catch |err| {
^
???:?:?: 0x743485973ccf in ??? (libc.so.6)
Unwind information for `libc.so.6:0x743485973ccf` was not available, trace may be incomplete
Aborted
Expected Behavior
An option or environment value to specifically silence all std.Progress
output would be very nice.
Metadata
Metadata
Assignees
Labels
questionNo questions on the issue tracker, please.No questions on the issue tracker, please.