Missing warnings for negative and too big shift count
Vexu opened this issue · comments
Veikka Tuominen commented
$ clang a.c -c
a.c:1:14: warning: shift count is negative [-Wshift-count-negative]
int a = 0b11 << -32;
^ ~~~
a.c:2:14: warning: shift count >= width of type [-Wshift-count-overflow]
int b = 0b11 << 32;
^ ~~
2 warnings generated.
Carter Snook commented
Should this be implemented in Parser.zig
?
Veikka Tuominen commented
Yes but you can also change the shift functions in Value.zig
.