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 portable systems?

I don't like the -funsigned-char because that is "magic".  I rather just
explicitly say what I want.

Anyway, I solved the warnings by casting (or changing the type) of buffers
and pointers from "uint8_t" to "char" as "int8_t" seemed to cause grief as
well.

Cheers!

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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 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 uint8_t) or "signed char" (int8_t) at all.
A portable application needs to handle all three types as distinct, as
the default signedness of the type "char" is not determined by the
standard.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list




_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to