aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2003-03-22 15:34:41 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2003-03-22 15:34:41 +0000
commit3e4a35628b614d3e155ae9853888d69c5e89a354 (patch)
tree18470b6d27dbd4fa2ef409287ea10c344c20ee5e /gcc/cp/class.c
parentc8fcf20ce6259bb102901de9df6c999afb3bc0fe (diff)
downloadgcc-3e4a35628b614d3e155ae9853888d69c5e89a354.zip
gcc-3e4a35628b614d3e155ae9853888d69c5e89a354.tar.gz
gcc-3e4a35628b614d3e155ae9853888d69c5e89a354.tar.bz2
PR c++/9978, c++/9708
cp: PR c++/9978, c++/9708 * cp-tree.h (instantiate_template): Add tsubst_flags parameter. * call.c (add_template_candidate_real): Adjust instantiate_template call. * class.c (resolve_address_of_overloaded_function): Likewise. * decl.c (build_enumerator): Set TREE_CONSTANT. * pt.c (check_instantiated_args): New. (push_inline_template_parms_recursive): Set TREE_CONSTANT, TREE_READONLY. (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY. (reduce_template_parm_level): Likewise. (process_template_parm): Likewise. (check_explicit_specialization): Adjust instantiate_template call. (convert_template_argument): Don't check non-type argument here. (lookup_template_class): Check them here. (tsubst_friend_function): Adjust instantiate_template call. (instantiate_template): Add tsubst_flags parameter, use it. Check instantiated args. testsuite: PR c++/9978, c++/9708 * g++.dg/ext/vlm1.C: Adjust expected error. * g++.dg/ext/vla2.C: New test. * g++.dg/template/arg1.C: New test. * g++.dg/template/arg2.C: New test. From-SVN: r64714
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 0df87ae..e899c57 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -5989,7 +5989,8 @@ cannot resolve overloaded function `%D' based on conversion to type `%T'",
continue;
/* Instantiate the template. */
- instantiation = instantiate_template (fn, targs);
+ instantiation = instantiate_template (fn, targs,
+ complain ? tf_error : tf_none);
if (instantiation == error_mark_node)
/* Instantiation failed. */
continue;