This is the mail archive of the
mailing list for the GCC project.
Re: C++ PATCH: Use VAR_P instead of direct TREE_CODE (t) == VAR_DECL
- From: Gabriel Dos Reis <gdr at axiomatics dot org>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 29 Mar 2013 12:02:31 -0500
- Subject: Re: C++ PATCH: Use VAR_P instead of direct TREE_CODE (t) == VAR_DECL
- References: <87mwtmkxil dot fsf at euclid dot axiomatics dot org> <5155C755 dot 1000107 at oracle dot com>
Paolo Carlini <firstname.lastname@example.org> writes:
| On 03/29/2013 04:59 PM, Gabriel Dos Reis wrote:
| > This patch introduces the predicate VAR_P and use it in place of direct
| > TREE_CODE (t) == VAR_DECL
| > It improves readability and makes predicates easier to follow.
| > Tested on an x86_64-suse-linux. Applying to trunk.
| Do you think it would also make sense to consistently use in C++
| front-end TYPE_PTR_P instead of TREE_CODE (t) == POINTER_TYPE? It's
| something I noticed a while ago when I cleaned-up predicated related
| to pointers and occurred to me again now that you are doing some of
| this kind of work. If you like I can do this bit.
Yes, you are absolutely right. Thanks for volunteering.