how gcc thinks `char' as signed char or unsigned char ?

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

 



---------------------------------
int main()
{
	char a = -7;
	
	if( a < -9 )
		printf("a");
	else
		printf("b");
}
---------------------------------
sde-gcc -c a2.c
c:/a2.c: In function `main':
c:/a2.c:6: warning: comparison is always false due to limited range of data type

It may be the reason for this warning that gcc thinks `char' as 'unsigned char' by default.
Can I change the default configuration by modifying some configuration file?
Or this feature can't be changed after gcc has been built?


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux