You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function main(): i32 {
.0:
stack_alloc [i8 x 1], %0:ptr
store 1000:i8, %0:ptr
ret 0:i32
}
Of course you can't store 1000 in an i8, so this should wrap the integer around correctly 232.
(In fact clang actually warns about this, and gives this
C:\helix\.\testsuite\f.c:4:15: warning: implicit conversion from 'int' to 'u8' (aka 'unsigned char') changes value from
1000 to 232 [-Wconstant-conversion]
u8 my_byte = 1000;
~~~~~~~ ^~~~
The text was updated successfully, but these errors were encountered:
Given this C code
the following IR is generated
Of course you can't store 1000 in an i8, so this should wrap the integer around correctly 232.
(In fact clang actually warns about this, and gives this
The text was updated successfully, but these errors were encountered: