On 15/07/17 20:11, René Scharfe wrote:
> The pointer p is dereferenced and we get an unsigned char. Before
> shifting it's automatically promoted to int. Left-shifting a signed
> 32-bit value bigger than 127 by 24 places is undefined. Explicitly
> convert to a 32-bit unsigned type to avoid
The pointer p is dereferenced and we get an unsigned char. Before
shifting it's automatically promoted to int. Left-shifting a signed
32-bit value bigger than 127 by 24 places is undefined. Explicitly
convert to a 32-bit unsigned type to avoid undefined behaviour if
the highest bit is set.
2 matches
Mail list logo