public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* how gcc thinks `char' as signed char or unsigned char ?
@ 2008-03-05  9:20 PRC
  2008-03-05  9:58 ` Andrew Haley
  2008-03-05 13:08 ` John Love-Jensen
  0 siblings, 2 replies; 5+ messages in thread
From: PRC @ 2008-03-05  9:20 UTC (permalink / raw)
  To: gcc-help

---------------------------------
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?

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-03-05 14:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-05  9:20 how gcc thinks `char' as signed char or unsigned char ? PRC
2008-03-05  9:58 ` Andrew Haley
2008-03-05 13:08 ` John Love-Jensen
2008-03-05 13:32   ` Tom St Denis
2008-03-05 14:11     ` John Love-Jensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).