From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MjBFP-000154-F2 for qemu-devel@nongnu.org; Thu, 03 Sep 2009 08:17:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MjBFK-0000yF-Ip for qemu-devel@nongnu.org; Thu, 03 Sep 2009 08:17:02 -0400 Received: from [199.232.76.173] (port=42050 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjBFK-0000xk-6Y for qemu-devel@nongnu.org; Thu, 03 Sep 2009 08:16:58 -0400 Received: from mx20.gnu.org ([199.232.41.8]:28322) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MjB3t-00055H-Pb for qemu-devel@nongnu.org; Thu, 03 Sep 2009 08:05:09 -0400 Received: from mtaout01-winn.ispmail.ntl.com ([81.103.221.47]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MjB3e-0007Iu-2L for qemu-devel@nongnu.org; Thu, 03 Sep 2009 08:04:55 -0400 Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090903120429.XMBZ6742.mtaout01-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com> for ; Thu, 3 Sep 2009 13:04:29 +0100 Received: from miranda.arrow ([213.107.24.213]) by aamtaout03-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20090903120429.YGDB2093.aamtaout03-winn.ispmail.ntl.com@miranda.arrow> for ; Thu, 3 Sep 2009 13:04:29 +0100 Received: from sdb by miranda.arrow with local (Exim 4.63) (envelope-from ) id 1MjB4S-0007ik-Ge for qemu-devel@nongnu.org; Thu, 03 Sep 2009 13:05:44 +0100 Date: Thu, 3 Sep 2009 13:05:44 +0100 From: Stuart Brady Subject: Re: Coding style, C++ compatible code (was Re: [Qemu-devel] [PATCH 02/22] eepro100: cast a void * makes no sense) Message-ID: <20090903120544.GA29558@miranda.arrow> References: <51486eb6860d1680c1bce45e310dcd3aae096f43.1251111439.git.quintela@redhat.com> <4A928DF0.9000106@weilnetz.de> <87tyzxnwvb.fsf@pike.pond.sub.org> <4A953E20.8080806@mail.berlios.de> <20090826155824.GA3785@1und1.de> <4A955E17.60605@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A955E17.60605@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Wed, Aug 26, 2009 at 07:08:55PM +0300, Avi Kivity wrote: > Or better, NEW() and NEW_ARRAY(). ISTR this being discussed before, but there was some disagreement regarding whether it is preferable to have: QEMU_NEW(ptr); or: ptr = QEMU_NEW(type); If the type is incorrect, the latter form would still at least yield a warning (and now therefore a build failure). It seems slightly more readable to me, so that's the form that I would have preferred... Is there any reason that this wouldn't be accepted, or should I start submitting patches? Cheers, -- Stuart Brady