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] Fix names of various macro parameters in tree.h


On Fri, Oct 25, 2013 at 3:17 AM, David Malcolm <dmalcolm@redhat.com> wrote:
> I noticed that some of the macros in tree.h that act on trees have
> parameters named "CODE", rather "NODE", which is confusing when in the
> presence of other macros that act on enum tree_code values.
>
> The attached patch renames such params for macros that I believe act on
> trees (mostly because they go ahead and lookup the TREE_CODE() of the
> param).
>
> Successfully bootstrapped&regtested on x86_64-unknown-linux.
>
> OK for trunk?

Ok.

Thanks,
Richard.

> (fwiw the macros appear to have been this way since they were introduced
> in 87675 in 2004-09-17)
>
> gcc/
>         * tree.h (EXCEPTIONAL_CLASS_P): Rename parameter from "CODE"
>         to "NODE", since this works on a "tree", not an
>         "enum tree_code".
>         (CONSTANT_CLASS_P): Likewise.
>         (TYPE_P): Likewise.
>         (DECL_P): Likewise.
>         (INDIRECT_REF_P): Likewise.
>         (REFERENCE_CLASS_P): Likewise.
>         (COMPARISON_CLASS_P): Likewise.
>         (UNARY_CLASS_P): Likewise.
>         (BINARY_CLASS_P): Likewise.
>         (STATEMENT_CLASS_P): Likewise.
>         (VL_EXP_CLASS_P): Likewise.
>         (EXPRESSION_CLASS_P): Likewise.
>         (IS_TYPE_OR_DECL_P): Likewise.
>


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