This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][C++/Java] Get rid of the walk_subtrees langhook


On Sun, 5 Aug 2007, Mark Mitchell wrote:

> Richard Guenther wrote:
> 
> > 2007-07-26  Richard Guenther  <rguenther@suse.de>
> > 
> > 	* tree.c (WALK_SUBTREE): Call walk_tree_1.
> > 	(walk_type_fields): Take lh parameter.
> 
> This is OK, with one change: I don't think "walk_tree_lh" is a mnemonic
> name for the type of the supplemental walker function.  Perhaps
> "walk_subtree_fn", like "walk_tree_fn", is better.  In any case, the
> typedef should have a comment saying what the varios parameters are.

walk_subtree_fn isn't any better I think (walk_tree_lh was supposed to
mean _langhook ;)).  The walk_tree_lh function has the same signature
as the (old) walk_tree function, so walk_tree_fn would be a match, but
that is already used...  Initially I didn't expose the signature with
a typedef, but writing the long prototype everywhere isn't any better.

I added a comment before the typedef and left the name in place
(I volunteer to change it to sth else if anyone has a good idea as
a followup).

> With those changes, the patch is fine, thanks!

Thanks,
Richard.

-- 
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]