From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iy6mo-0005KS-TB for qemu-devel@nongnu.org; Fri, 30 Nov 2007 09:24:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iy6mm-0005HA-UV for qemu-devel@nongnu.org; Fri, 30 Nov 2007 09:24:10 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iy6mm-0005H5-Rg for qemu-devel@nongnu.org; Fri, 30 Nov 2007 09:24:08 -0500 Received: from smtp.citrix.com ([66.165.176.89]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iy6mm-0004Aq-BX for qemu-devel@nongnu.org; Fri, 30 Nov 2007 09:24:08 -0500 Received: from implementation.famille.thibault.fr (dhcp-16-192.uk.xensource.com [172.31.16.192]) by smtp01.ad.xensource.com (8.13.1/8.13.1) with ESMTP id lAUEO2kd000689 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Fri, 30 Nov 2007 06:24:04 -0800 Received: from samy by implementation.famille.thibault.fr with local (Exim 4.68) (envelope-from ) id 1Iy6mg-0002YX-1V for qemu-devel@nongnu.org; Fri, 30 Nov 2007 15:24:02 +0100 Date: Fri, 30 Nov 2007 14:24:02 +0000 From: Samuel Thibault Subject: Re: [Qemu-devel] [PATCH] fix gcc4 compile warnings Message-ID: <20071130142402.GD4211@implementation.uk.xensource.com> References: <474F5223.1000202@andrep.de> <475019BF.4040906@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <475019BF.4040906@amd.com> 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 Andre Przywara, le Fri 30 Nov 2007 15:10:07 +0100, a écrit : > A more portable and clean solution would be this: > - void *args[MAX_ARGS]; > + union > + { > + void* ptr; > + int i; > + } args[MAX_ARGS]; It's not more portable: C99 doesn't asserts that if you write ptr and read i you will get the result of a cast (only gcc does). void * should be fine. Samuel