summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgrahams <grahams@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-10 18:45:05 +0000
committergrahams <grahams@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-10 18:45:05 +0000
commitbfb2681d09df50cc9a301e4ebb38a9c3a2107d4b (patch)
tree5b11479321887df0bbf5f2e06a7053c07f5c6d10
parent4ff5402e35d6895f8a605ca1a81efc3ca46557f9 (diff)
downloadppe42-gcc-bfb2681d09df50cc9a301e4ebb38a9c3a2107d4b.tar.gz
ppe42-gcc-bfb2681d09df50cc9a301e4ebb38a9c3a2107d4b.zip
* pt.c (template_parm_this_level_p, push_template_decl_real):
Pass depth as int pointer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55374 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c11
2 files changed, 11 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index dee8747ed3e..8482ab04b42 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2002-07-10 Graham Stott <graham.stott@btinternet.com>
+
+ * pt.c (template_parm_this_level_p, push_template_decl_real):
+ Pass depth as int pointer.
+
2002-07-10 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (unqualified_name_lookup_error): Declare it.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index c6d41f4ec26..98a9f31211c 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -2498,7 +2498,7 @@ template_parm_this_level_p (t, data)
tree t;
void *data;
{
- int this_level = (int)data;
+ int this_level = *(int *)data;
int level;
if (TREE_CODE (t) == TEMPLATE_PARM_INDEX)
@@ -2734,13 +2734,14 @@ push_template_decl_real (decl, is_friend)
DECL_PRIMARY_TEMPLATE (tmpl) = tmpl;
if (DECL_CONV_FN_P (tmpl))
{
+ int depth = TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (tmpl));
+
/* It is a conversion operator. See if the type converted to
depends on innermost template operands. */
- if (for_each_template_parm
- (TREE_TYPE (TREE_TYPE (tmpl)),
- template_parm_this_level_p,
- (void *)TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (tmpl))))
+ if (for_each_template_parm (TREE_TYPE (TREE_TYPE (tmpl)),
+ template_parm_this_level_p,
+ &depth))
DECL_TEMPLATE_CONV_FN_P (tmpl) = 1;
}
}
OpenPOWER on IntegriCloud