This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Shift left by negative value

Hello all,

I'm trying to figure out how CCE 2 handles a shift left by a negative value. Something like:

temp = 1 << -1;

K&R C says this is implementation specific. I'm not planning on using this as a hack, but I would like to understand what might happen should this ever happen.

When I disassemble it, it seems to be loading values into registers and then calls a memory location that corresponds to I_LSL according to my .map file.

**Attention** This is a public forum