tree.c (walk_tree): Don't walk into default args.
authorJason Merrill <jason@redhat.com>
Fri, 20 Oct 2000 21:26:26 +0000 (17:26 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 20 Oct 2000 21:26:26 +0000 (17:26 -0400)
        * tree.c (walk_tree): Don't walk into default args.

        * error.c (dump_expr): Use host_integerp.

From-SVN: r36984

gcc/cp/ChangeLog
gcc/cp/error.c
gcc/cp/tree.c

index b5730961aed09b581f17a94c9e9bdeb7c9b643cb..c3582fcc2b63dd1e69ab85632f4f9921240d1531 100644 (file)
@@ -1,3 +1,9 @@
+2000-10-20  Jason Merrill  <jason@redhat.com>
+
+       * tree.c (walk_tree): Don't walk into default args.
+
+       * error.c (dump_expr): Use host_integerp.
+
 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
 
        * typeck2.c (abstract_virtuals_error): Use "because" instead of
index e9837026934a69a61d893531d519d56e533de5a7..cb27751e34ed492b2a034d0c8af3439af0dfb6e2 100644 (file)
@@ -1609,8 +1609,7 @@ dump_expr (t, flags)
        else
          {
            do_int:
-           if ((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (t)
-               != (TREE_INT_CST_LOW (t) >> (HOST_BITS_PER_WIDE_INT - 1)))
+           if (! host_integerp (t, 0))
              {
                tree val = t;
 
index a1d37c86698650f05ed555b5f69aa3457e49996f..f974067135ad3e7fe9a67c2e48de4d33218039fb 100644 (file)
@@ -1388,7 +1388,13 @@ walk_tree (tp, func, data, htab)
 
     case FUNCTION_TYPE:
       WALK_SUBTREE (TREE_TYPE (*tp));
-      WALK_SUBTREE (TYPE_ARG_TYPES (*tp));
+      {
+       tree arg = TYPE_ARG_TYPES (*tp);
+
+       /* We never want to walk into default arguments.  */
+       for (; arg; arg = TREE_CHAIN (arg))
+         WALK_SUBTREE (TREE_VALUE (arg));
+      }
       break;
 
     case ARRAY_TYPE: