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
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,
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
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
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
* 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
-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
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.
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.
* 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
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
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
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
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
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
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'
-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
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
] 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
19 matches
Mail list logo