Hello all,
I though about it and searched the bug list in the links provided by the sticky posts, but I haven't yet understood why the code
uint8_t flag; uint8_t function (void) { return flag; }
generates a 16 bit return value (snippet from the LST file):
(...) uint8_t flag; uint8_t function (void) { 4c: 80 91 60 00 lds r24, 0x0060 return flag; } 50: 99 27 eor r25, r25 52: 08 95 ret (...)
Isn't the "eor r25, r25" a "redundant" instruction?...
I'm compiling with "-g -Os". I updated my older (2005) WinAVR version to the most recent one (2007) and it still generates a 16bit return type.
P.S. By the way, great improvement from that old 2005 to the new 2007 version. The code size on the project I'm working on now was reduced by ~7.9% just by using the new version.
Edit: Added the attached files.