Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Shift Count is too Large (shift-left) on CCE v3

> Sorry if this is the wrong place for this question, but has anyone tried
> shift-lefts on CCE v3? I am getting"Shift Count is too Large" warnings when
> I try to shift a byte 16 or more bits to the left and the CCE seem to not
> execute the shift. Any idea why this is happening?
> 
> ex.
> *longint = (**sampleChar[0] << 16 & 0xFF0000)*, where longint is a variable
> of type unsigned long int, produces the warning I stated.

This is definitely the wrong place for these type of questions, but my
guess is that your compilers integer size is only 16-bits and even
though you're assigning to a long, the expression uses integer
arithmetic, so you should use some casting, e.g.
 ((unsigned long int)**sampleChar[0] << 16 & 0xFF0000L)

Good luck finding the CCE mailing list...


Back to the top