qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] PARAMS
@ 2004-02-12  3:48 David Holman
  2004-02-12  4:28 ` Johan Rydberg
  0 siblings, 1 reply; 2+ messages in thread
From: David Holman @ 2004-02-12  3:48 UTC (permalink / raw)
  To: qemu-devel

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.

Thanks,
David

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] PARAMS
  2004-02-12  3:48 [Qemu-devel] PARAMS David Holman
@ 2004-02-12  4:28 ` Johan Rydberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Rydberg @ 2004-02-12  4:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: davholman

David Holman <davholman@softhome.net> 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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-02-12  4:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-12  3:48 [Qemu-devel] PARAMS David Holman
2004-02-12  4:28 ` Johan Rydberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).