mspgcc group:
I've been trying to use the right shift operator and have been seeing some
weirdness with long values. I cannot right shift by certain constant values: 8,
16+.
long a;
a = 0x12345678;
// These compile and work fine:
a = a >> 1;
a = a >> 2;
a = a >> 3;
:
:
a = a >> 7;
// The value 8 compiles (unlike left shift), but does not work correctly
a = a >> 9;
:
a = a >> 15;
// Any constant 16 and above does not work correctly
Any help would be appreciated.
- Paul
