diff options
author | Giovanni Bajo <giovannibajo@gcc.gnu.org> | 2004-02-04 11:26:26 +0000 |
---|---|---|
committer | Giovanni Bajo <giovannibajo@gcc.gnu.org> | 2004-02-04 11:26:26 +0000 |
commit | baa4973045be48f05b719b1d36b7df0428ef2922 (patch) | |
tree | 407588a851cb0a519dedf1c161029c598b2046a9 /gcc | |
parent | 06effe875c0dad1b8f27e868058d8401e74a4363 (diff) | |
download | gcc-baa4973045be48f05b719b1d36b7df0428ef2922.zip gcc-baa4973045be48f05b719b1d36b7df0428ef2922.tar.gz gcc-baa4973045be48f05b719b1d36b7df0428ef2922.tar.bz2 |
pt.c (more_specialized_class): Increase processing_template_decl while partial ordering.
* pt.c (more_specialized_class): Increase processing_template_decl
while partial ordering.
From-SVN: r77236
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/pt.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 47fbb96..aa852a6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2003-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org> + + * pt.c (more_specialized_class): Increase processing_template_decl + while partial ordering. + 2004-02-03 Mark Mitchell <mark@codesourcery.com> PR c++/13925 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index b8a02fb..7040138 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -10121,6 +10121,11 @@ more_specialized_class (tree pat1, tree pat2, tree full_args) tree targs; int winner = 0; + /* Just like what happens for functions, if we are ordering between + different class template specializations, we may encounter dependent + types in the arguments, and we need our dependency check functions + to behave correctly. */ + ++processing_template_decl; targs = get_class_bindings (TREE_VALUE (pat1), TREE_PURPOSE (pat1), add_outermost_template_args (full_args, TREE_PURPOSE (pat2))); if (targs) @@ -10130,6 +10135,7 @@ more_specialized_class (tree pat1, tree pat2, tree full_args) add_outermost_template_args (full_args, TREE_PURPOSE (pat1))); if (targs) ++winner; + --processing_template_decl; return winner; } |