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: [C++ PATCH] Stage 2: Implement access check for template instantiation (2/n)


Paolo Bonzini wrote:


> The first operand of ACCESS corresponds to TREE_PURPOSE, > and the second operand of ACCESS corresponds to TREE_VALUE > of TREE_LIST respectively. Several ACCESS nodes can be > linked in a linked list via TREE_CHAIN.

Can you please consider accessing the field via a separate ACCESS_CHAIN macro (it is fine to #define it to TREE_CHAIN, it is only for clarity)?

The TREE_CHAIN field is common to all tree nodes.  All sort of
tree nodes such as *_DECL, *_STMT, etc. use this, not just TREE_LIST
and ACCESS.  So everyone is familiar with TREE_CHAIN use.  In my
opinion, changing to ACCESS_CHAIN makes the code less clear.

--Kriang


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