This is the mail archive of the gcc@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]

Question about DECL_RESULT macro


I am trying to gain more understanding of gcc trees.  In 
cp/cp-tree.def, for TEMPLATE_DECL, the comments that document the key 
fields of a TEMPLATE_DECL say that a DECL_RESULT is for non-class 
templates.  So if I interpret this right, if "node" is a 
TEMPLATE_DECL then DECL_RESULT(node) points to some other node.

However, the DECL_RESULT macro is defined (in tree.h) to do a 
FUNCTION_DECL_CHECK.  That only checks for FUNCTION_DECL nodes and 
will fail for a TEMPLATE_DECL node.  So, is the TEMPLATE_DECL comment 
wrong in cp/cp-tree.def for DECL_RESULT and should that just be 
DECL_TEMPLATE_RESULT instead?

Ira Ruben


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