diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-16 14:58:33 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-16 14:58:33 +0000 |
commit | 8bc34e340f263fe78def23eeb33c46a2501b7ae7 (patch) | |
tree | dfb6a7dff4d68c89e59f58390b9db8526bbbb080 | |
parent | 6d1cc52ccc8ccbb8d83ceb218c2e24ee9bbd2c4b (diff) | |
download | gcc-8bc34e340f263fe78def23eeb33c46a2501b7ae7.tar.gz |
cp/
2009-11-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/42055
* pt.c (determine_specialization): Assign to candidates the return
value of the chainon called before print_candidates.
testsuite/
2009-11-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/42055
* testsuite/g++.dg/template/crash92.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154202 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/pt.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/crash92.C | 7 |
4 files changed, 19 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2b18d012b7a..ce4415d3f7f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,11 @@ 2009-11-16 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/42055 + * pt.c (determine_specialization): Assign to candidates the return + value of the chainon called before print_candidates. + +2009-11-16 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/32056 * decl.h (enum decl_context): Add TPARM enumerator. * decl.c (grokdeclarator): Per 14.1/2, error out if a storage class diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index b7d72c1045a..4ca94d6a895 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -1941,7 +1941,7 @@ determine_specialization (tree template_id, { error ("ambiguous template specialization %qD for %q+D", template_id, decl); - chainon (candidates, templates); + candidates = chainon (candidates, templates); print_candidates (candidates); return error_mark_node; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 753a8b29d0e..42702ebd9d5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2009-11-16 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/42055 + * testsuite/g++.dg/template/crash92.C: New. + +2009-11-16 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/32056 * testsuite/g++.dg/template/error44.C: New. diff --git a/gcc/testsuite/g++.dg/template/crash92.C b/gcc/testsuite/g++.dg/template/crash92.C new file mode 100644 index 00000000000..c0219c4a3e8 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/crash92.C @@ -0,0 +1,7 @@ +// PR c++/42055 + +template<typename T> void foo(T, T); // { dg-error "candidates|template" } + +template<typename T> void foo(T, int); // { dg-error "template" } + +template void foo(int, int); // { dg-error "ambiguous template specialization" } |