public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "PRC" <panruochen@gmail.com>
To: "gcc-help" <gcc-help@gcc.gnu.org>
Subject: how gcc thinks `char' as signed char or unsigned char ?
Date: Wed, 05 Mar 2008 09:20:00 -0000	[thread overview]
Message-ID: <200803051719569448630@gmail.com> (raw)

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

             reply	other threads:[~2008-03-05  9:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-05  9:20 PRC [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200803051719569448630@gmail.com \
    --to=panruochen@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).