From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JF7Os-0000CI-Pz for qemu-devel@nongnu.org; Wed, 16 Jan 2008 07:29:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JF7Or-0000Bp-Sv for qemu-devel@nongnu.org; Wed, 16 Jan 2008 07:29:46 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JF7Or-0000Bc-OR for qemu-devel@nongnu.org; Wed, 16 Jan 2008 07:29:45 -0500 Received: from mtagate8.uk.ibm.com ([195.212.29.141]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JF7Or-0006A2-6f for qemu-devel@nongnu.org; Wed, 16 Jan 2008 07:29:45 -0500 Received: from d06nrmr1407.portsmouth.uk.ibm.com (d06nrmr1407.portsmouth.uk.ibm.com [9.149.38.185]) by mtagate8.uk.ibm.com (8.13.8/8.13.8) with ESMTP id m0GCTh7a186214 for ; Wed, 16 Jan 2008 12:29:43 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m0GCThmQ5005452 for ; Wed, 16 Jan 2008 12:29:43 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m0GCTeMI026100 for ; Wed, 16 Jan 2008 12:29:40 GMT Received: from [9.152.198.52] (dyn-9-152-198-52.boeblingen.de.ibm.com [9.152.198.52]) by d06av02.portsmouth.uk.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id m0GCTeUv026085 for ; Wed, 16 Jan 2008 12:29:40 GMT Message-ID: <478DF8B3.1080909@linux.vnet.ibm.com> Date: Wed, 16 Jan 2008 13:29:39 +0100 From: Christian Ehrhardt MIME-Version: 1.0 References: <47876B99.1000600@linux.vnet.ibm.com> <1200063861.5833.19.camel@basalt> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [kvm-ppc-devel] The default for char Literals differ in signedness between platforms causing us a lot of warnings 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 Hi, the following discussion is from kvm-ppc-devel, but it is actually an qem= u discussion so I move th topic to qemu-devel. The original thread is cited in the mail below, in short the issue is the= following: Newer gcc versions generate warnings about implicit casts between differe= nt 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 els= e (I did not find anything like that in the latest cvs snapshot or on this list)? --- thread from kvm-ppc-devel --- Jimi Xenidis wrote: >=20 > On Jan 11, 2008, at 10:04 AM, Hollis Blanchard wrote: >=20 >> On Fri, 2008-01-11 at 14:14 +0100, Christian Ehrhardt wrote: >>> Hi, >>> maybe its an issue of my build environment only, but when I compile >>> kvm-userspace for our platform I see a lot of warnings like that in >>> the qemu code: >>> >>> warning: pointer targets in passing argument 3 of >>> 'PPC_NVRAM_set_params' differ in signedness >>> >>> The reason is that some code defines function prototypes and variable= s >>> with the type "const unsigned char*" and then assigns a literal like >>> "PPC" to it. But per default our platform seems to have "const signed >>> char*" for literals and so we get a lot of annoying warnings. E.g. >>> nearly every line in qemu/target-ppc/translate.c. >>> >>> Should we do anything to prevent these Warnings or do you even see >>> those ? >> >> That warning only appears in recent versions of gcc. In fact I believe >> there are 3 different types: char *, unsigned char *, and signed char = *, >> and implicitly casting between them generates the warnings. :( >> >>>[...] >> >> It's a qemu issue. If you want to fix it, you should bring it up on >> qemu-devel and see what they think about it. >=20 > this is what: > # disable pointer signed / unsigned warnings in gcc 4.0 > KBUILD_CFLAGS +=3D $(call cc-option,-Wno-pointer-sign,) >=20 > In linux/Makefile is for. > -JX --=20 Gr=FCsse / regards,=20 Christian Ehrhardt IBM Linux Technology Center, Open Virtualization