A
Alex
I have a problem about the comparison between signed and unsigned
integer.
See the following code:
int foo()
{
int i;
unsigned int j;
if (i < j)
{
...
}
return 0;
}
When I compile it with ccarm(a gcc version released by Wind River
designate for arm), no warning. But when I comile it with ccppc(a gcc
version released by Wind River for PowerPC), there is a warning
"warning: comparison between signed and unsigned".
Who can tell me the reason. Thank.
I also use gcc(x86, pc) test it, no warning.
integer.
See the following code:
int foo()
{
int i;
unsigned int j;
if (i < j)
{
...
}
return 0;
}
When I compile it with ccarm(a gcc version released by Wind River
designate for arm), no warning. But when I comile it with ccppc(a gcc
version released by Wind River for PowerPC), there is a warning
"warning: comparison between signed and unsigned".
Who can tell me the reason. Thank.
I also use gcc(x86, pc) test it, no warning.