[Top][All Lists]

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

RE: [avr-gcc-list] are signed chars signed :-) ?

From: Dave Hylands
Subject: RE: [avr-gcc-list] are signed chars signed :-) ?
Date: Mon, 6 Sep 2004 10:42:27 -0700

Hi Bernard,

> I just do not understand why I get such a warning! Gcc 
> on Linux groks the function without complaining with 
> -Wall. 'a' being signed, I feel I have the right to compare 
> it to being greater or equals to zero, no ? ;-)

Different compilers (and perhaps even different versions of the same compiler) 
can treat char as signed or unsigned. If you really want one or the other then 
use the appropriate keyword:

        signed char a;


        unsigned char a;

Then you'll get a specific type rather than the compiler default.

Dave Hylands
Vancouver, BC, Canada

reply via email to

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