diff options
author | Jason Merrill <jason@redhat.com> | 2009-07-29 16:35:40 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2009-07-29 16:35:40 -0400 |
commit | 8b334f7b0967171297c275cd9c922a84508c3440 (patch) | |
tree | 8967d064fe0fb79f53b568377a57adbd38c20fd3 /gcc/testsuite | |
parent | 9e34da8b076782c692a7e4fa6587fd19764d9b2d (diff) | |
download | gcc-8b334f7b0967171297c275cd9c922a84508c3440.zip gcc-8b334f7b0967171297c275cd9c922a84508c3440.tar.gz gcc-8b334f7b0967171297c275cd9c922a84508c3440.tar.bz2 |
re PR c++/14912 (Do not print default template arguments in error messages)
PR c++/14912
* cp-tree.h (enum tsubst_flags): Add tf_no_class_instantiations.
* error.c (count_non_default_template_args): Pass it.
* pt.c (tsubst) [TYPENAME_TYPE]: Don't complete type if it's set.
From-SVN: r150223
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/defarg13.C | 19 |
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0e55fab..e3b6103 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-07-29 Jason Merrill <jason@redhat.com> + + PR c++/14912 + * g++.dg/template/defarg13.C: New. + 2009-07-29 Richard Guenther <rguenther@suse.de> PR c++/40834 diff --git a/gcc/testsuite/g++.dg/template/defarg13.C b/gcc/testsuite/g++.dg/template/defarg13.C new file mode 100644 index 0000000..ba2980b --- /dev/null +++ b/gcc/testsuite/g++.dg/template/defarg13.C @@ -0,0 +1,19 @@ +// PR c++/14912 +// Bug: We were instantiating A<B> in order to compare it to the matching +// argument for C<B,B>, which fails. + +template <class T> +struct A +{ + typedef typename T::F F; +}; + +struct B { }; + +template <class T, class U = typename A<T>::F > +struct C +{ + typename T::F f; // { dg-error "no type" } +}; + +C<B, B> c; // { dg-message "instantiated" } |