This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems shifting an int 32 times. Gcc 3.4.5


> I have a problem using the shift operator, maybe a bug (ok, a bug or i'm
> wrong about shift operator)

You are wrong about the shift operator. This is a bug in your code, not a gcc 
bug. Shift operators are only defined for non-negative shifts counts less 
than the size of the value being shifted.

This is a practical necessity because hardware varies greatly on how it treats 
out of range shifts.

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]