diff options
author | Paolo Carlini <pcarlini@suse.de> | 2008-02-22 11:02:00 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2008-02-22 11:02:00 +0000 |
commit | 54062fc0da3a1009eb0f53e899fb44d8b7b4a177 (patch) | |
tree | fb823f930efc33f1a9a8d837229a9125f51c63f5 /gcc/cp | |
parent | 4af63337bebe68e3010849286d45a0341dbb1081 (diff) | |
download | gcc-54062fc0da3a1009eb0f53e899fb44d8b7b4a177.zip gcc-54062fc0da3a1009eb0f53e899fb44d8b7b4a177.tar.gz gcc-54062fc0da3a1009eb0f53e899fb44d8b7b4a177.tar.bz2 |
re PR c++/35282 (Template specialization rejected)
/testsuite
2008-02-22 Paolo Carlini <pcarlini@suse.de>
PR c++/35282
* g++.dg/template/nontype17.C: Add.
/cp
2008-02-22 Paolo Carlini <pcarlini@suse.de>
PR c++/35282
Revert:
2008-02-14 Paolo Carlini <pcarlini@suse.de>
PR c++/28743
* pt.c (determine_specialization): In case of function templates,
when the type of DECL does not match FN there is no match.
/testsuite
2008-02-22 Paolo Carlini <pcarlini@suse.de>
PR c++/35282
Revert:
2008-02-14 Paolo Carlini <pcarlini@suse.de>
PR c++/28743
* g++.dg/template/nontype17.C: New.
* g++.dg/template/nontype16.C: Add error.
From-SVN: r132543
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/cp/pt.c | 9 |
2 files changed, 16 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b300db0..19c34ba 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,13 @@ +2008-02-22 Paolo Carlini <pcarlini@suse.de> + + PR c++/35282 + Revert: + 2008-02-14 Paolo Carlini <pcarlini@suse.de> + + PR c++/28743 + * pt.c (determine_specialization): In case of function templates, + when the type of DECL does not match FN there is no match. + 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> PR c/19999 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index e45f6da..2a54986 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -1563,9 +1563,12 @@ determine_specialization (tree template_id, no partial specializations of functions. Therefore, if the type of DECL does not match FN, there is no match. */ - if (tsk == tsk_template - && !compparms (fn_arg_types, decl_arg_types)) - continue; + if (tsk == tsk_template) + { + if (compparms (fn_arg_types, decl_arg_types)) + candidates = tree_cons (NULL_TREE, fn, candidates); + continue; + } /* See whether this function might be a specialization of this template. */ |