On Sunday 08 April 2007 05:38, Francesco Sacchi wrote: > I made a simple test, I took a large ATMega64 project and recompiled > with -funsigned-char and -fshort-enums. > > The code shrinks only about 200 bytes on an a total size of 59800. > This is only a 0.33% gain. It doesn't definitely worth the effort.
I'm going to give -fshort-enums a try then, in some cases it is worth the effort. In one of my projects I'd be happy to gain even a few more bytes. As to the unknown signedness of the C standard types consider following the MISRA guidelines: http://www.misra.org.uk/ MISRA-C-2004 Rule 6.3 (Advisory): "typedefs that indicate size and signs should be used in place of the basic types". 6.1/6.2 (required) cover the sign of Char issue. 'Plain char' is only to be used for characters, otherwise (un)signed char is explicit. What I've never understood at all is why are characters signed in any case? What exactly is the meaning of a negative-letter-"A"? It would be better to code to stdint.h, than rely on any ambiguous compiler switches/standard-C 'undefined' issues. http://www.dinkumware.com/manuals/?manual=compleat&page=stdint.html even "they can vary among implementations." :-( -- http://www.softwaresafety.net/ http://www.designer-iii.com/ http://www.unusualresearch.com/ _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list