From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GdtOW-00018s-Dl for qemu-devel@nongnu.org; Sat, 28 Oct 2006 14:59:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GdtOV-00016F-8v for qemu-devel@nongnu.org; Sat, 28 Oct 2006 14:58:59 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GdtOV-000160-1p for qemu-devel@nongnu.org; Sat, 28 Oct 2006 14:58:59 -0400 Received: from [71.162.243.5] (helo=grelber.thyrsus.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GdtOV-0004ux-1J for qemu-devel@nongnu.org; Sat, 28 Oct 2006 14:58:59 -0400 From: Rob Landley Subject: Re: [Qemu-devel] [PATCH] Fix char signedness Date: Sat, 28 Oct 2006 14:58:33 -0400 References: <200610280009.17673.paul@codesourcery.com> In-Reply-To: <200610280009.17673.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610281458.33806.rob@landley.net> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Andreas Schwab , Paul Brook On Friday 27 October 2006 7:09 pm, Paul Brook wrote: > > > > It has been a really long time I have been working on a broken system > > > > that did not default to "signed". > > > > > > The only thing that is broken is your knowlege of C. > > > > Okay. > > > > And what system did you encounter this behaviour on? > > Common arm, ppc, s390 and mips systems all have default char as unsigned. > As do a few other less common embedded systems. BusyBox added "-funsigned-char" to our build to get consistent behavior. (I picked unsigned because that way we were automatically 8-bit clean in things like sed.) (I note that tcc doesn't work right if built with -funsigned-char, so I wouldn't be too surprised if qemu had the same problem.) In both cases, specifying -fsigned-char in the build should fix it. > Paul 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