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
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) {