From: Rob Landley <rob@landley.net>
To: qemu-devel@nongnu.org
Cc: schwab@suse.de
Subject: Re: [Qemu-devel] [PATCH] Fix char signedness
Date: Sat, 28 Oct 2006 15:04:08 -0400 [thread overview]
Message-ID: <200610281504.08692.rob@landley.net> (raw)
In-Reply-To: <56d259a00610280346j5b88de07p203dd6f82c3543c2@mail.gmail.com>
On Saturday 28 October 2006 6:46 am, Martin Guy wrote:
> > gcc on ARM systems default to unsigned. The C standard specifically
> > states that char is either signed or unsigned at the whim of the
> > implementor
>
> Or, more to the point, at the behest of the machine architecture.
> Having to generate code to sign-extend the hard way every time you do
> char-integer promotion if the hardware doesn't do it automatically
> would be long and inefficient, specially since it happens all the
> time.
I'd rather have inefficient than broken. And in general, using "char" as a
small "int" is going to _suck_ on arm. The extra code size more than makes
up for the data size you save if you only have one or two instances of your
data at a time.
Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
next prev parent reply other threads:[~2006-10-28 19:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-27 17:07 [Qemu-devel] [PATCH] Fix char signedness Andreas Schwab
2006-10-27 17:40 ` Johannes Schindelin
2006-10-27 17:54 ` andrzej zaborowski
2006-10-27 17:58 ` Andreas Schwab
2006-10-27 18:23 ` M. Warner Losh
2006-10-28 10:46 ` Martin Guy
2006-10-28 19:04 ` Rob Landley [this message]
2006-10-27 22:57 ` Johannes Schindelin
2006-10-27 23:09 ` Paul Brook
2006-10-28 18:58 ` Rob Landley
2006-10-27 23:12 ` Thiemo Seufer
2006-10-27 23:17 ` M. Warner Losh
2006-10-28 10:14 ` Laurent Desnogues
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=200610281504.08692.rob@landley.net \
--to=rob@landley.net \
--cc=qemu-devel@nongnu.org \
--cc=schwab@suse.de \
/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).