linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Bob Brose <linuxppcdev@qbjnet.com>
To: linuxppc-dev@ozlabs.org
Subject: (no subject)
Date: 3 Oct 2005 01:00:39 -0000	[thread overview]
Message-ID: <20051003010039.20105.qmail@kunk.qbjnet.com> (raw)

I'm trying to fix some of the AX25 code in the 2.6 kernel and traced down
a problem to the use of a char var which was being assigned
the value of -1. On x86 when the var was compared to -1 it succeded but
on PPC it failed. So I tried a simple test:

main()
{
char atest;
atest=-1;
printf("%i,%X\n",atest,atest);
}

With GCC 3.3.5 on 2.6.14-rc1 x86 I get:
./atest
-1,FFFFFFFF

With GCC 3.3.5 on 2.6.14-rc1 PPC I get:
./atest
255,FF

If I change the declaration of atest to a signed char on PPC I get the
same result as x86.

Does this mean the char in x86 is signed and in PPC it's unsigned?
Has it always been thus?
 

             reply	other threads:[~2005-10-03  1:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-03  1:00 Bob Brose [this message]
2005-10-03  7:07 ` (no subject) Andreas Schwab
  -- strict thread matches above, loose matches on Subject: below --
2021-12-27 14:59 [PATCH v2 2/3] arm64: Support huge vmalloc mappings Kefeng Wang
2021-12-27 17:35 ` (No subject) William Kucharski
2021-12-28  1:36   ` Kefeng Wang
2008-01-03  8:33 Awad, Sinan (GE Healthcare)
2008-01-03 10:34 ` (no subject) Misbah khan
2006-07-06 12:21 Jochen Maes
     [not found] <20051227010004.D4C7568950@ozlabs.org>
2005-12-27 15:29 ` siman
2005-12-03 18:40 Otavio Salvador
2005-09-27 13:53 ÏÄÓê 
2005-09-27 16:07 ` Wolfgang Denk
2005-06-29  6:21 董晓凡
2005-06-29 16:22 ` evilninja
2005-06-27 12:25 FLAMENT David
2005-06-13 11:38 colui77
2005-04-12 19:38 Eric N. Johnson (ACD)
2005-04-12 21:13 ` Wolfgang Denk
2005-02-13 12:28 Support for Adder875 in Linux 2.4 Markus Westergren
2005-02-14  6:45 ` Yuli Barcohen
2005-02-14 19:44   ` Markus Westergren
2005-02-15  9:35     ` (no subject) Yuli Barcohen
2004-11-22 19:23 Ratin Kumar
2004-11-22 22:53 ` Kumar Gala

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=20051003010039.20105.qmail@kunk.qbjnet.com \
    --to=linuxppcdev@qbjnet.com \
    --cc=linuxppc-dev@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).