Subject: Re: c-style question
To: Matt Thomas <email@example.com>
From: Simon Burge <firstname.lastname@example.org>
Date: 11/19/2001 16:45:33
Matt Thomas wrote:
> At 03:13 PM 11/19/2001 +1100, Simon Burge wrote:
> >In KNF, do we prefer either
> > (*platform.cons_init)();
> > platform.cons_init();
> >when cons_init is a function pointer?
> I prefer the former since it makes it explicit that you are calling
> a function pointer.
Aesthetically speaking, I prefer the later :-) It just looks a little
less like line noise (to me)...
> >Related is why in the above example we get an error in the later case
> >but not the former. "cons_init" is a macro in <dev/cons.h>, but for
> >some reason it doesn't get expanded in the first case. Any clue sticks
> >available for something simple I might have overlooked?
> I bet cons_init is defined as cons_init() which won't be expanded
> on just a plain cons_init reference (the first case).
Simon Burge <email@example.com>
NetBSD CDs, Support and Service: http://www.wasabisystems.com/