Re: [avr-gcc-list] New GCC warning - how to silence?

2007-04-10 Thread David Brown
Joerg Wunsch wrote: The issue is, any implementation will always have to implement it as either unsigned char == char != signed char or unsigned char != char == signed char. Yet, as the default signedness of char is not defined by the standard, any *portable* application has to be written

Re: [avr-gcc-list] New GCC warning - how to silence?

2007-04-09 Thread Dave Hansen
From: Bob Paddock [EMAIL PROTECTED] [...] 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's all hysterical raisins. The earliest C compilers made char signed by default because ASCII only requires 7 bits,

Re: [avr-gcc-list] New GCC warning - how to silence?

2007-04-08 Thread Francesco Sacchi
Eric Weddington ha scritto: And if the end-user doesn't have those flags, or isn't aware of them, then they will get signed chars and enums that take up 16-bits. Sorry Eric but I am totally disagree with you. Chars can be signed or unsigned, but if you write correct portable code signedness

Re: [avr-gcc-list] New GCC warning - how to silence?

2007-04-08 Thread Rolf Magnus
On Sonntag, 8. April 2007, Francesco Sacchi wrote: Eric Weddington ha scritto: And if the end-user doesn't have those flags, or isn't aware of them, then they will get signed chars and enums that take up 16-bits. Sorry Eric but I am totally disagree with you. Chars can be signed or

Re: [avr-gcc-list] New GCC warning - how to silence?

2007-04-08 Thread Bob Paddock
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

Re: [avr-gcc-list] New GCC warning - how to silence?

2007-04-07 Thread Lars Noschinski
* Eric Weddington [EMAIL PROTECTED] [07-04-07 08:56]: The makefile template that has been shipping with WinAVR since 2002 has consistently had -funsigned-char and -fshort-enums in the compiler flags. Not everybody uses WinAVR or mfile. For example, the gcc-avr debian package doesn't ship

RE: [avr-gcc-list] New GCC warning - how to silence?

2007-04-07 Thread Eric Weddington
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] On Behalf Of Lars Noschinski Sent: Saturday, April 07, 2007 1:11 AM To: avr-gcc-list@nongnu.org Subject: Re: [avr-gcc-list] New GCC warning - how to silence? * Eric Weddington [EMAIL PROTECTED] [07-04

Re: [avr-gcc-list] New GCC warning - how to silence?

2007-04-07 Thread Rolf Magnus
On Samstag, 7. April 2007, larry barello wrote: One thing that still bothers me, maybe I just missed it: Why is char != int8_t at this point? Because the standard forbids it. I sort of see why, but that is just an artifact of libc written with non-portable char. Actually, it is portable.

Re: [avr-gcc-list] New GCC warning - how to silence?

2007-04-06 Thread Dmitry K.
It is interesting, what was a reason to declare default char as signed for AVR port? Many other GCC ports use unsigned. I find only one CPU that is suitable for such choice: PDP-11, where the shortest method to read memory (mov_byte_from_memory_to_register) expands a sign bit. Dmitry.

Re: [avr-gcc-list] New GCC warning - how to silence?

2007-04-06 Thread Lars Noschinski
* larry barello [EMAIL PROTECTED] [07-04-06 09:01]: Ok, this is the most interesting answer and begs another question: Are you just saying use either signed or unsigned (I typically use uint8_t except when the signedness counts) or is char a distinct type that has defined behavior across

Re: [avr-gcc-list] New GCC warning - how to silence?

2007-04-06 Thread Joerg Wunsch
As larry barello wrote: Are you just saying use either signed or unsigned (I typically use uint8_t except when the signedness counts) or is char a distinct type that has defined behavior across portable systems? char is always either signed or unsigned, but as a portable application must not

RE: [avr-gcc-list] New GCC warning - how to silence?

2007-04-06 Thread Eric Weddington
It is interesting, what was a reason to declare default char as signed for AVR port? Right now, there *is* a reason: consistency. We've always had it that way. Many other GCC ports use unsigned. I guess Denis inherited it from the i386 port that also defaults to signed

Re: [avr-gcc-list] New GCC warning - how to silence?

2007-04-06 Thread Rolf Magnus
On Freitag, 6. April 2007, Lars Noschinski wrote: * larry barello [EMAIL PROTECTED] [07-04-06 09:01]: Ok, this is the most interesting answer and begs another question: Are you just saying use either signed or unsigned (I typically use uint8_t except when the signedness counts) or is char a

Re: [avr-gcc-list] New GCC warning - how to silence?

2007-04-06 Thread Rolf Magnus
On Freitag, 6. April 2007, Eric Weddington wrote: I found it in avr.h of the port: #define DEFAULT_SIGNED_CHAR 1 So this means that the AVR defaults to a signed char. Can we change this to be unsigned?: Why? ___ AVR-GCC-list mailing list

Re: [avr-gcc-list] New GCC warning - how to silence?

2007-04-06 Thread Joerg Wunsch
As Eric Weddington wrote: The makefile explicitly compiles with -funsigned-chars Which just doesn't matter at all. , yet this produces a warning. Sure. It's a deficiency of the old compiler to *not* have produced that warning. Note that the issue seems to be when it is a pointer to a

[avr-gcc-list] New GCC warning - how to silence?

2007-04-05 Thread larry barello
This is a new warning with the latest WinAvr. What does it mean and how do I silence it? It is highly annoying that the buffers are even concerned whether a byte value is signed or not when dealing with characters. TetherTask.c:191: warning: pointer targets in passing argument 1 of 'sscanf_P'

RE: [avr-gcc-list] New GCC warning - how to silence?

2007-04-05 Thread Eric Weddington
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] On Behalf Of larry barello Sent: Thursday, April 05, 2007 12:07 PM To: avr-gcc-list@nongnu.org Subject: [avr-gcc-list] New GCC warning - how to silence? This is a new warning with the latest WinAvr

Re: [avr-gcc-list] New GCC warning - how to silence?

2007-04-05 Thread Joerg Wunsch
Eric Weddington [EMAIL PROTECTED] wrote: GCC 4 seems to be a lot more concerned about the differences between char and unsigned char. Are you using the -funsigned-char flag in your compiler command? Regardless of which is the default, just never mix up char with either unsigned char (or

RE: [avr-gcc-list] New GCC warning - how to silence?

2007-04-05 Thread larry barello
] On Behalf Of Joerg Wunsch Sent: Thursday, April 05, 2007 3:02 PM To: avr-gcc-list@nongnu.org Subject: Re: [avr-gcc-list] New GCC warning - how to silence? Eric Weddington [EMAIL PROTECTED] wrote: GCC 4 seems to be a lot more concerned about the differences between char and unsigned char. Are you