Hi, Antonio On Tuesday 28 August 2007 15:56, DI BACCO ANTONIO - technolabs wrote: > Consider the following C code snippet: [snip] > char x = -4; [snip] > > 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. >
You can also use the -fsigned-char compilation flag, in this case. -- Ricardo Scop. _______________________________________________ Linuxppc-embedded mailing list [email protected] https://ozlabs.org/mailman/listinfo/linuxppc-embedded
