aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorDouglas Gregor <doug.gregor@gmail.com>2007-11-06 14:37:56 +0000
committerDoug Gregor <dgregor@gcc.gnu.org>2007-11-06 14:37:56 +0000
commit1ad8aeeb962a281f654be3bc0a7a2dd4015d317b (patch)
tree83b93ec8d6832f10e12b455400f3daa46f208750 /gcc/cp/parser.c
parent3de36a09ac124ff2b1bf50c822259ca206f88f23 (diff)
downloadgcc-1ad8aeeb962a281f654be3bc0a7a2dd4015d317b.zip
gcc-1ad8aeeb962a281f654be3bc0a7a2dd4015d317b.tar.gz
gcc-1ad8aeeb962a281f654be3bc0a7a2dd4015d317b.tar.bz2
re PR c++/31439 (ICE with variadic template and broken specialization)
2007-11-06 Douglas Gregor <doug.gregor@gmail.com> PR c++/31439 PR c++/32114 PR c++/32115 PR c++/32125 PR c++/32126 PR c++/32127 PR c++/32128 PR c++/32253 PR c++/32566 * typeck.c (check_return_expr): Pass address of retval to check_for_bare_parameter_packs. * class.c (build_base_field): Tolerate bases that have no layout due to errors. (end_of_base): Ditto. * tree.c (canonical_type_variant): Be careful with ERROR_MARK_NODE. * cp-tree.h (check_for_bare_parameter_packs): Now accepts a tree*. * pt.c (find_parameter_pack_data): Add set_packs_to_error field, which states whether parameter packs should be replaced with ERROR_MARK_NODE. (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever possible. If set_packs_to_error is set true, replace the parameter pack with ERROR_MARK_NODE. Manage our own pointer sets. (uses_parameter_packs): Don't set parameter packs to ERROR_MARK_NODE. (check_for_bare_parameter_packs): Now takes a pointer to a tree, which may be modified (if it is a parameter pack). Instructs find_parameter_packs_r to replace parameter packs with ERROR_MARK_NODE (so that they won't cause errors later on). (process_template_parm): Pass pointer to check_for_bare_parameter_packs. (process_partial_specialization): Replace pack expansions before the end of the template argument list with ERROR_MARK_NODE. (push_template_decl_real): Pass pointer to check_for_bare_parameter_packs. Replace parameter packs not at the end of the template parameter list with ERROR_MARK_NODE. (convert_template_argument): Be more careful about using DECL_NAME on only declarations. (unify): Can't unify against ERROR_MARK_NODE. * semantics.c (finish_cond): Pass pointer to check_for_bare_parameter_packs. (finish_expr_stmt): Ditto. (finish_for_expr): Ditto. (finish_switch_cond): Pass pointer to check_for_bare_parameter_packs, and call it before we put the condition into the statement. (finish_mem_initializers): Pass pointer to check_for_bare_parameter_packs. (finish_member_declaration): Ditto. * parser.c (cp_parser_base_clause): Ditto. 2007-11-06 Douglas Gregor <doug.gregor@gmail.com> * testsuite/g++.dg/parser/crash36.C: Tweak expected errors. * testsuite/g++.dg/cpp0x/pr31439.C: New. * testsuite/g++.dg/cpp0x/pr32114.C: New. * testsuite/g++.dg/cpp0x/pr32115.C: New. * testsuite/g++.dg/cpp0x/pr32125.C: New. * testsuite/g++.dg/cpp0x/pr32126.C: New. * testsuite/g++.dg/cpp0x/pr32127.C: New. * testsuite/g++.dg/cpp0x/pr32128.C: New. * testsuite/g++.dg/cpp0x/pr32253.C: New. * testsuite/g++.dg/cpp0x/pr32566.C: New. * testsuite/g++.dg/cpp0x/pr31445.C: Tweak expected errors. * testsuite/g++.dg/cpp0x/pr31438.C: Ditto. * testsuite/g++.dg/cpp0x/variadic81.C: Ditto. * testsuite/g++.dg/cpp0x/pr31432.C: Ditto. * testsuite/g++.dg/cpp0x/pr31442.C: Ditto. From-SVN: r129928
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 4729d1e..23994b0 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -15248,7 +15248,7 @@ cp_parser_base_clause (cp_parser* parser)
/* Make this a pack expansion type. */
TREE_VALUE (base) = make_pack_expansion (TREE_VALUE (base));
else
- check_for_bare_parameter_packs (TREE_VALUE (base));
+ check_for_bare_parameter_packs (&TREE_VALUE (base));
TREE_CHAIN (base) = bases;
bases = base;