[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: show function pointer evaluations
From: |
Daniel Reed |
Subject: |
Re: show function pointer evaluations |
Date: |
Thu, 30 Sep 2004 18:07:32 -0400 (EDT) |
On 2004-09-30T22:56+0100, Gary V. Vaughan wrote:
) Ralf Wildenhues wrote:
) > I know this is not required by ANSI C (and thus not a bug per se), but
) > it's IMVHO clearer to see where function pointers are evaluated.
) > (and, what's more, it helps me finding these other nasty bugs :)
) Okay. I'm not especially bothered which style we use, as long as we use
) one consistently. Since you are being such a whirlwind in the bug
) fixing dept. I've already applied this to HEAD...
The syntax:
action(target, value);
will work regardless of whether action is a macro, a function, or a function
pointer. The syntax:
(*action)(target, value);
will require rewrites if action's label type changes. In the opposite, but
perhaps more-frequent case, if action changes from a function to a function
pointer, there becomes a style conflict that will not be shown as a syntax
error.
I would encourage the patch be reverted and any future style guidelines
request that function pointers be dereferenced syntactically just like
functions are called.
--
Daniel Reed <address@hidden> http://people.redhat.com/djr/
http://naim.n.ml.org/
There is a lot of food in a supermarket, too, but a supermarket isn't
the best place to hold a dinner party. -- Christopher Faylor