Why does -fsanitize=undefined throw
-fsanitize=undefined
runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
on this code
uint32_t z; z = 1 << 31;
?
Make the 1 unsigned:
uint32_t z; z = UINT32_C(1) << 31;