Orin Eman wrote: > > c = c << 1; and c <<= 1 will both generate the same code in the > > MPC compiler > > Some compilers turn c <<= 1 into c = (int)c << (int)1 and throw > warnings if c is smaller than int, but don't throw the warning on c = > c << 1. Just something that has been irritating me at work recently, > not on a PIC compiler though. The as if rule should kick in in both cases. That is a left shift should be cast to an int, shifted and stored back or act as if that had happened. In the left shift case it should have no code generation difference. Sounds like a wayward warning in the compiler you are using w.. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist