summaryrefslogtreecommitdiff
path: root/gcc/cp/lex.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-04 04:34:03 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-04 04:34:03 +0000
commit32d008d96c324cc44d8a92b38cb67ed33e24f040 (patch)
tree8ef0778c524d062435bf88b94bc898d7b8a51acb /gcc/cp/lex.c
parent9612ce4d00fe6fdb71bcbddc8e07d41fa348ab53 (diff)
downloadgcc-32d008d96c324cc44d8a92b38cb67ed33e24f040.tar.gz
PR c++/40619
* cp-tree.h (struct lang_decl_parm): New. (struct lang_decl): Add it. (LANG_DECL_PARM_CHECK): New. (DECL_PARM_INDEX): New. * decl2.c (parm_index): Remove. * lex.c (retrofit_lang_decl): Handle parms. (cxx_dup_lang_specific_decl): Likewise. * mangle.c (write_expression): Adjust. * tree.c (cp_tree_equal): Adjust. (decl_linkage): Only check DECL_COMDAT for functions and variables. * parser.c (cp_parser_parameter_declaration_list): Set DECL_PARM_INDEX. * pt.c (iterative_hash_template_arg): Hash it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149223 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/lex.c')
-rw-r--r--gcc/cp/lex.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 5effd7a0d77..5eb182d3caf 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -538,6 +538,8 @@ retrofit_lang_decl (tree t)
sel = 1, size = sizeof (struct lang_decl_fn);
else if (TREE_CODE (t) == NAMESPACE_DECL)
sel = 2, size = sizeof (struct lang_decl_ns);
+ else if (TREE_CODE (t) == PARM_DECL)
+ sel = 3, size = sizeof (struct lang_decl_parm);
else if (LANG_DECL_HAS_MIN (t))
sel = 0, size = sizeof (struct lang_decl_min);
else
@@ -577,6 +579,8 @@ cxx_dup_lang_specific_decl (tree node)
size = sizeof (struct lang_decl_fn);
else if (TREE_CODE (node) == NAMESPACE_DECL)
size = sizeof (struct lang_decl_ns);
+ else if (TREE_CODE (node) == PARM_DECL)
+ size = sizeof (struct lang_decl_parm);
else if (LANG_DECL_HAS_MIN (node))
size = sizeof (struct lang_decl_min);
else