summaryrefslogtreecommitdiffstats
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authordgregor <dgregor@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-06 14:37:56 +0000
committerdgregor <dgregor@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-06 14:37:56 +0000
commit4eaf1b439b6b6a2ee17d18d7765a7ecca5eadeb7 (patch)
tree83b93ec8d6832f10e12b455400f3daa46f208750 /gcc/cp/tree.c
parentf06a2c3ba76583e52ee7a128aa4a25027236cde3 (diff)
downloadppe42-gcc-4eaf1b439b6b6a2ee17d18d7765a7ecca5eadeb7.tar.gz
ppe42-gcc-4eaf1b439b6b6a2ee17d18d7765a7ecca5eadeb7.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129928 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 64efda50d65..fba7c2281f0 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -846,6 +846,9 @@ cp_build_qualified_type_real (tree type,
tree
canonical_type_variant (tree t)
{
+ if (t == error_mark_node)
+ return error_mark_node;
+
return cp_build_qualified_type (TYPE_MAIN_VARIANT (t), cp_type_quals (t));
}
OpenPOWER on IntegriCloud