From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JF7wG-0005K0-Vw for qemu-devel@nongnu.org; Wed, 16 Jan 2008 08:04:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JF7wG-0005Jb-1T for qemu-devel@nongnu.org; Wed, 16 Jan 2008 08:04:16 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JF7wF-0005JY-TU for qemu-devel@nongnu.org; Wed, 16 Jan 2008 08:04:15 -0500 Received: from mail-dub.bigfish.com ([213.199.154.10] helo=mail29-dub-R.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JF7wF-0006Mq-BK for qemu-devel@nongnu.org; Wed, 16 Jan 2008 08:04:15 -0500 Message-ID: <478DFFC4.7030903@amd.com> Date: Wed, 16 Jan 2008 13:59:48 +0100 From: "Andre Przywara" MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [kvm-ppc-devel] The default for char Literals differ in signedness between platforms causing us a lot of warnings References: <47876B99.1000600@linux.vnet.ibm.com> <1200063861.5833.19.camel@basalt> <478DF8B3.1080909@linux.vnet.ibm.com> In-Reply-To: <478DF8B3.1080909@linux.vnet.ibm.com> Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ehrhardt@linux.vnet.ibm.com Cc: qemu-devel@nongnu.org Christian, > Newer gcc versions generate warnings about implicit casts between > different signed pointers. > That hits a lot of qemu code at least what I saw it compiling for ppc > or x86. > So my question is, is there already a preferred qemu approach to get > rid of these warnings > either the -Wno-pointer-sign solution like in the kernel or something > else (I did not find > anything like that in the latest cvs snapshot or on this list)? I fixed some of these issues in qemu at least for x86[1][2], those were commited mid of December[3] . I ported these over to Xen and posted it there[4]. I don't know what's the ultimate policy regarding these problems, my solution is: 1. Change the type whenever possible. 2. Introduce casts if 1. is not applicable or would introduce more back-castings. Regards, Andre. [1] QEMU first proposal (all in one file) with comments: http://lists.gnu.org/archive/html/qemu-devel/2007-11/msg00827.html [2] QEMU reworked version (splitted up to address multiple issues) http://lists.gnu.org/archive/html/qemu-devel/2007-12/msg00146.html [3] QEMU commits: http://lists.gnu.org/archive/html/qemu-devel/2007-12/msg00417.html http://lists.gnu.org/archive/html/qemu-devel/2007-12/msg00420.html http://lists.gnu.org/archive/html/qemu-devel/2007-12/msg00448.html http://lists.gnu.org/archive/html/qemu-devel/2007-12/msg00452.html [4] Xen devel post http://lists.xensource.com/archives/html/xen-devel/2008-01/msg00185.html -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany Tel: +49 351 277-84917 ----to satisfy European Law for business letters: AMD Saxony Limited Liability Company & Co. KG, Wilschdorfer Landstr. 101, 01109 Dresden, Germany Register Court Dresden: HRA 4896, General Partner authorized to represent: AMD Saxony LLC (Wilmington, Delaware, US) General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy