ppc_8xx-gcc from eldk strange behaviour

Scott Wood scottwood at freescale.com
Wed Aug 29 05:01:58 EST 2007


On Tue, Aug 28, 2007 at 08:56:10PM +0200, DI BACCO ANTONIO - technolabs wrote:
> If I compile it with host gcc, there is no warning and the message "x is negative" is printed.
> If I compile it with ppc_8xx-gcc there is a warning "main.c:11: warning: comparison is always false due to limited range of data type" and the program prints message "x is positive". 
> To correct the problem I have to put signed before char.

C does not specify the signedness of char.  If you care, you need to
explicitly specify.

-Scott


More information about the Linuxppc-embedded mailing list