linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Ricardo Scop <rscop@matrix.com.br>
To: linuxppc-embedded@ozlabs.org
Cc: DI BACCO ANTONIO - technolabs <Antonio.DiBacco@technolabs.it>
Subject: Re: ppc_8xx-gcc from eldk strange behaviour
Date: Wed, 29 Aug 2007 01:50:46 -0300	[thread overview]
Message-ID: <200708290150.46317.rscop@matrix.com.br> (raw)
In-Reply-To: <F1F6EC0C8B75034F9E3A79FC85122E8E2649AF@aquib01a>

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.

      parent reply	other threads:[~2007-08-29  5:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-28 18:56 ppc_8xx-gcc from eldk strange behaviour DI BACCO ANTONIO - technolabs
2007-08-28 19:01 ` Scott Wood
2007-08-29  9:28   ` DI BACCO ANTONIO - technolabs
2007-08-29 23:28     ` Wolfgang Denk
2007-08-29  4:50 ` Ricardo Scop [this message]

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=200708290150.46317.rscop@matrix.com.br \
    --to=rscop@matrix.com.br \
    --cc=Antonio.DiBacco@technolabs.it \
    --cc=linuxppc-embedded@ozlabs.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 NNTP newsgroup(s).