avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: larry barello
Subject: RE: [avr-gcc-list] New GCC warning - how to silence?
Date: Thu, 5 Apr 2007 15:19:59 -0700

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: address@hidden
[mailto:address@hidden On Behalf Of
Joerg Wunsch
Sent: Thursday, April 05, 2007 3:02 PM
To: address@hidden
Subject: Re: [avr-gcc-list] New GCC warning - how to silence?

Eric Weddington <address@hidden> 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
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list






reply via email to

[Prev in Thread] Current Thread [Next in Thread]