I'm using HiTech C on a 16F688 and notice a promotion I didn't think should happen. Here's a little example. "Something" is unimportant but included for context. unsigned char foo; unsigned char bar; unsigned char bat; if(bat==foo+bar) Something(); The compiler promotes the unsigned chars to integers, does the add and does the comparison. In the past I always thought HiTech used the native data size unless there was a reason not to (although I can't seem to find reference to that right now). And since everything, including the left operator "bat" are unsigned chars, I assumed (incorrectly) that all the math and comparisons would be 8 bit. Optimization is set as high as it goes, and this is the paid version of the compiler. Manually casting does fix it: if(bat==((unsigned char)(foo+bar))) Something(); And something like this also does efficient 8 bit math: if(!(bat^(foo&bar))) but this doesn't: if(!(bat^(foo+bar))) so it isn't that the comparison with a constant (the implied "0") is the reason for the promotion, it's the use of addition. I haven't been able to find any reference that covers these cases in 8-bit implementations of "C" and my HiTech manual hasn't given me anything either. Any idea where I can look for definitive rules on this? Thanks, Bob -- http://www.fastmail.fm - Send your email first class -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist