This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][C++/Java] Get rid of the walk_subtrees langhook
- From: Richard Guenther <rguenther at suse dot de>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 20 Aug 2007 13:17:49 +0200 (CEST)
- Subject: Re: [PATCH][C++/Java] Get rid of the walk_subtrees langhook
- References: <Pine.LNX.4.64.0707261627310.6492@s68.fhfr.qr> <46B66A3E.8050403@codesourcery.com>
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