On May 27, 2011, at 2:47 PM, Gerhard Fiedler wrote: >> PORTB |=3D 2 had better compile to a single BSF instruction when =20 >> possible (for example), or you go yell at the compiler vendor.) > > [compiler documentation] should in enough detail address everything =20 > that is not standard C -- for example, how it handles bits, ports, =20 > stack, variable banks, recursion, pointers etc. > > Don't go yell at the vendor before having read the docs... :) Current philosophy seems to be that a compiler should produce good =20 code from STANDARD C constructs, without having to resort to non-=20 standard bit-set macros. avr-gcc had deprecated sbi/cbi "functions" in =20 favor of "just use var |=3D/&=3D~ bit", for example. After all, part of the point of using a C compiler is portability. =20 Non-standard architecture-specific features should be avoided whenever =20 possible. BillW --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .