RE: [avr-gcc-list] Should this code work? 4.1.1

2007-03-02 Thread James L. Evans
Shouldn't the declaration of shift be OUTSIDE the for block (or in the for expression). Otherwize, shift is always 1 and the if (0 == shift) can be optimized away. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bob Paddock Sent: Friday, March 02, 2007

[avr-gcc-list] Horrible code

2006-05-16 Thread James L. Evans
Could someone with a 4.1 version of the AVR-GCC compiler please compile the following code (-Os) and see if it generates better code than the horrible code (25 instructions) generated for Case 2 by version 3.4.3? Thanks, Jim Evans #include inttypes.h #include avr/io.h void test7(void) {