decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
authorMark Mitchell <mark@codesourcery.com>
Wed, 15 Sep 1999 22:49:33 +0000 (22:49 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 15 Sep 1999 22:49:33 +0000 (22:49 +0000)
* decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
* pt.c (tsubst_copy): Likewise.
* tree.c (search_tree): Likewise.
(mapcar): Likewise.

From-SVN: r29440

gcc/cp/ChangeLog
gcc/cp/decl2.c
gcc/cp/pt.c
gcc/cp/tree.c

index e6cdab7..066b247 100644 (file)
@@ -1,3 +1,10 @@
+1999-09-15  Mark Mitchell  <mark@codesourcery.com>
+
+       * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
+       * pt.c (tsubst_copy): Likewise.
+       * tree.c (search_tree): Likewise.
+       (mapcar): Likewise.
+
 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * typeck2.c (ack): Don't declare progname.
index 14dc741..5ba6c6d 100644 (file)
@@ -4026,6 +4026,10 @@ build_expr_from_tree (t)
     case VAR_DECL:
       return convert_from_reference (t);
 
+    case VA_ARG_EXPR:
+      return build_va_arg (build_expr_from_tree (TREE_OPERAND (t, 0)),
+                          TREE_TYPE (t));
+
     default:
       return t;
     }
index 704ac44..c4d829f 100644 (file)
@@ -7206,6 +7206,11 @@ tsubst_copy (t, args, complain, in_decl)
        return r;
       }
 
+    case VA_ARG_EXPR:
+      return build_va_arg (tsubst_copy (TREE_OPERAND (t, 0), args, complain,
+                                       in_decl),
+                          tsubst (TREE_TYPE (t), args, complain, in_decl));
+     
     default:
       return t;
     }
index 48425ed..0805092 100644 (file)
@@ -1656,6 +1656,7 @@ search_tree (t, func)
     case EXIT_EXPR:
     case LOOP_EXPR:
     case BIT_FIELD_REF:
+    case VA_ARG_EXPR:
       TRY (TREE_OPERAND (t, 0));
       break;
 
@@ -1929,6 +1930,7 @@ mapcar (t, func)
     case CLEANUP_POINT_EXPR:
     case THROW_EXPR:
     case STMT_EXPR:
+    case VA_ARG_EXPR:
       t = copy_node (t);
       TREE_TYPE (t) = mapcar (TREE_TYPE (t), func);
       TREE_OPERAND (t, 0) = mapcar (TREE_OPERAND (t, 0), func);