This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Fix incorrect comments for TEMPLATE_DECL
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: Fix incorrect comments for TEMPLATE_DECL
- From: Ira Ruben <ira at apple dot com>
- Date: Sun, 1 Jul 2001 20:40:44 -0700
The comments referring to DECL_RESULT for a TEMPLATE_DECL in
cp/dp-tree.def should actually refer to DECL_TEMPLATE_RESULT.
DECL_RESULT cannot be correct since that will fail for anything
other than a FUNCTION_DECL. DECL_TEMPLATE_RESULT appears to be
what was actually intended (e.g., see code for
redeclaration_error_message() in cp/decl.c). This patch corrects
the comments:
2001-07-01 Ira Ruben <ira@apple.com>
Fix incorrect comment referring to DECL_RESULT.
* cp-tree.def (TEMPLATE_DECL) : DECL_RESELT should be
DECL_TEMPLATE_RESULT.
Index: cp-tree.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.def,v
retrieving revision 1.58
diff -c -3 -p -r1.58 cp-tree.def
*** cp-tree.def 2001/05/21 15:39:19 1.58
--- cp-tree.def 2001/07/02 03:25:37
*************** DEFTREECODE (EMPTY_CLASS_EXPR, "empty_cl
*** 84,93 ****
only done for functions so far
For class template:
DECL_INITIAL associated templates (methods &c)
! DECL_RESULT null
For non-class templates:
TREE_TYPE type of object to be constructed
! DECL_RESULT decl for object to be created
(e.g., FUNCTION_DECL with tmpl parms used)
*/
DEFTREECODE (TEMPLATE_DECL, "template_decl", 'd', 0)
--- 84,93 ----
only done for functions so far
For class template:
DECL_INITIAL associated templates (methods &c)
! DECL_TEMPLATE_RESULT null
For non-class templates:
TREE_TYPE type of object to be constructed
! DECL_TEMPLATE_RESULT decl for object to be created
(e.g., FUNCTION_DECL with tmpl parms used)
*/
DEFTREECODE (TEMPLATE_DECL, "template_decl", 'd', 0)