Hey, thank you for this great project!
Here is a quick reproducer:
typedef enum {
one = 1,
two = 2,
three = 3,
four = 4,
} EnumValues;
static inline int dynamic_array_access(EnumValues idx) {
static const int values[] = {0, 1, 2, 3, 4};
return values[idx - 1];
}
It will reach the following unreachable at
|
const maybe_bigger_than_usize = switch (index_qt.base(t.comp).type) { |
|
.bool => { |
|
break :index try ZigTag.int_from_bool.create(t.arena, index); |
|
}, |
|
.int => |int| switch (int) { |
|
.long_long, .ulong_long, .int128, .uint128 => true, |
|
else => false, |
|
}, |
|
.bit_int => |bit_int| bit_int.bits > t.comp.target.ptrBitWidth(), |
|
else => unreachable, |
|
}; |
Thank you!
Hey, thank you for this great project!
Here is a quick reproducer:
It will reach the following
unreachableattranslate-c/src/Translator.zig
Lines 3108 to 3118 in 0a146cc
Thank you!