[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] New GCC warning - how to silence?
From: |
Bob Paddock |
Subject: |
Re: [avr-gcc-list] New GCC warning - how to silence? |
Date: |
Sun, 8 Apr 2007 10:19:04 -0400 |
User-agent: |
KMail/1.9.5 |
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/
- Re: [avr-gcc-list] New GCC warning - how to silence?, (continued)
- Re: [avr-gcc-list] New GCC warning - how to silence?, Joerg Wunsch, 2007/04/06
- RE: [avr-gcc-list] New GCC warning - how to silence?, larry barello, 2007/04/07
- Re: [avr-gcc-list] New GCC warning - how to silence?, Rolf Magnus, 2007/04/07
- Re: [avr-gcc-list] New GCC warning - how to silence?, Joerg Wunsch, 2007/04/08
- RE: [avr-gcc-list] New GCC warning - how to silence?, Eric Weddington, 2007/04/08
- Re: [avr-gcc-list] New GCC warning - how to silence?, David Brown, 2007/04/10
- Re: [avr-gcc-list] New GCC warning - how to silence?, Lars Noschinski, 2007/04/07
- RE: [avr-gcc-list] New GCC warning - how to silence?, Eric Weddington, 2007/04/07
- Re: [avr-gcc-list] New GCC warning - how to silence?, Francesco Sacchi, 2007/04/08
- Re: [avr-gcc-list] New GCC warning - how to silence?, Rolf Magnus, 2007/04/08
- Re: [avr-gcc-list] New GCC warning - how to silence?,
Bob Paddock <=
- Re: [avr-gcc-list] New GCC warning - how to silence?, Dave Hansen, 2007/04/09
- RE: [avr-gcc-list] New GCC warning - how to silence?, Eric Weddington, 2007/04/05
- Re: [avr-gcc-list] New GCC warning - how to silence?, Dmitry K., 2007/04/06
- RE: [avr-gcc-list] New GCC warning - how to silence?, Eric Weddington, 2007/04/06
- Re: [avr-gcc-list] New GCC warning - how to silence?, Rolf Magnus, 2007/04/06
- RE: [avr-gcc-list] New GCC warning - how to silence?, Eric Weddington, 2007/04/06