Wouter van Ooijen wrote: >> I believe that a right shift of a negative number implemented as is by >> gcc is >> 'surprising' and does not follow the principle of 'least surprise'. > > I can partially agree with that , but the "principle of least surprise" > can not be applied without stating who the audience is. For *me* the > least surprise is when portability issues in my code give the weirdest > results possible. So a shift left of a negative number should order pizza. This doesn't make any sense. :) I'm quite sure that Wouter would freak out if a pizza delivery guy knocked on his door after he did a "shift left" on a negative number. Vitaliy -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist