Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqURb-0004Tc-G1 for qemu-devel@nongnu.org; Wed, 23 Sep 2009 12:11:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqURW-0004Q8-21 for qemu-devel@nongnu.org; Wed, 23 Sep 2009 12:11:50 -0400 Received: from [199.232.76.173] (port=54950 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqURV-0004Py-R8 for qemu-devel@nongnu.org; Wed, 23 Sep 2009 12:11:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45249) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MqURV-0008Fe-2H for qemu-devel@nongnu.org; Wed, 23 Sep 2009 12:11:45 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8NGBhVm011145 for ; Wed, 23 Sep 2009 12:11:43 -0400 Subject: Re: [Qemu-devel] [PATCH 0/7] Remove pre ANSI c89 code References: From: Markus Armbruster Date: Wed, 23 Sep 2009 18:11:42 +0200 In-Reply-To: (Juan Quintela's message of "Wed\, 23 Sep 2009 01\:18\:58 +0200") Message-ID: <87eipxiqtd.fsf@pike.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org Juan Quintela writes: > Hi > > In commemoration of the 20th anniversary of the c89 standard, this brings > qemu codebase to c89. How do I know? > > Previous to last patch adds to QEMU_CFLAGS: > -Wold-style-declaration -Wold-style-definition > > Why? > - typedef abuse for the 1st patch. How that ever worked, I don't know. > - gcc gets picky, and you have to declare functions as: > static inline void f(...) > inline static void f(...) > but > static void inline f(...) > gets warnings. Just move the few functions that have the third > format to the 1st one. > - bring alpha-dis.c and sh4-dis.c to ansi c89 function declaration. > - static + const: gcc wants you to use: > static const > and gives a warning for > const static > - same for static + __thread (only 1 occurrence) > - last patch removes PARAMS() from dis-asm.h > last users were alpha-dis.c and sh4-dis.c (do you start to see a > pattern here). > > Last one is not required, but as qemu is not going to compile in pre-c89 > compiler any time soon, it is better to also apply it. > > Later, Juan. None of these are incorrect C89, just terribly old-fashioned and/or bad style. Good cleanup.