Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Ar8TM-0000jl-P3 for qemu-devel@nongnu.org; Wed, 11 Feb 2004 23:29:08 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Ar8Sq-0000ZZ-2a for qemu-devel@nongnu.org; Wed, 11 Feb 2004 23:29:07 -0500 Received: from [193.45.208.6] (helo=griffin.skarpodata.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1Ar8Sp-0000ZQ-Jy for qemu-devel@nongnu.org; Wed, 11 Feb 2004 23:28:35 -0500 Date: Thu, 12 Feb 2004 05:28:25 +0100 From: Johan Rydberg Subject: Re: [Qemu-devel] PARAMS Message-Id: <20040212052825.30e6cead.jrydberg@night.trouble.net> In-Reply-To: <50216592-5D0E-11D8-ABB0-000A958C0AE6@softhome.net> References: <50216592-5D0E-11D8-ABB0-000A958C0AE6@softhome.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: davholman@softhome.net David Holman wrote: : Hi, : I've been looking at the QEMU source and I came across the PARAMS : macro in dis-asm.h. Why is this necessary? It looks to me like what's : comes out of PARAMS() is what goes into it, so why even have it? Sorry : if this is a dumb question, I searched the archives for it and didn't : find anything. dis-asm.h is from GNU binutils, which is supposed to work with really old compilers which doesn't support parameter prototypes. Therefor you define the PARAMS-macro; it expands to () for old compilers and to args for newer ones. That's also why a lot of the GNU code have K&R function heads. But I think they have started to move away from that (GDB has at least.) -- Johan Rydberg, Free Software Developer, Sweden http://rtmk.sf.net | http://www.nongnu.org/guss/