aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lex.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2009-07-04 00:34:03 -0400
committerJason Merrill <jason@gcc.gnu.org>2009-07-04 00:34:03 -0400
commitad909c97e2d84c7a497287eaabd498131d1ef5eb (patch)
tree8ef0778c524d062435bf88b94bc898d7b8a51acb /gcc/cp/lex.c
parentcaf271d8026c2f9a3ade32a8e670fa3be6e3892b (diff)
downloadgcc-ad909c97e2d84c7a497287eaabd498131d1ef5eb.zip
gcc-ad909c97e2d84c7a497287eaabd498131d1ef5eb.tar.gz
gcc-ad909c97e2d84c7a497287eaabd498131d1ef5eb.tar.bz2
re PR c++/40619 ([c++0x] ICE on repeated decltype expression in auto functions)
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. From-SVN: r149223
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 5effd7a..5eb182d 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