pt.c (template_parm_this_level_p, [...]): Pass depth as int pointer.
authorGraham Stott <graham.stott@btinternet.com>
Wed, 10 Jul 2002 18:45:05 +0000 (18:45 +0000)
committerGraham Stott <grahams@gcc.gnu.org>
Wed, 10 Jul 2002 18:45:05 +0000 (18:45 +0000)
* pt.c (template_parm_this_level_p, push_template_decl_real):
Pass depth as int pointer.

From-SVN: r55374

gcc/cp/ChangeLog
gcc/cp/pt.c

index dee8747ed3e3be215c447e8063300512fb7f0da2..8482ab04b4273728b2b5578eb1ee4888180bc1c2 100644 (file)
@@ -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.
index c6d41f4ec2604567f6c5ebbfbf08e6c10425e80c..98a9f31211c4ede4e0ca6a8a56deab0e54046a66 100644 (file)
@@ -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;
        }
     }