aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2000-06-22 09:27:15 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2000-06-22 09:27:15 +0000
commitea333e1ceadfd7c0ecb64e47bb844cd2b5e6acc9 (patch)
tree182f55c714a1b2b17ae90440176003c10de2e00d /gcc
parent98d4b1a6fdfbc3c1a1e292da88233f9aec74c291 (diff)
downloadgcc-ea333e1ceadfd7c0ecb64e47bb844cd2b5e6acc9.zip
gcc-ea333e1ceadfd7c0ecb64e47bb844cd2b5e6acc9.tar.gz
gcc-ea333e1ceadfd7c0ecb64e47bb844cd2b5e6acc9.tar.bz2
call.c (build_x_va_arg): Check if in a template decl.
* call.c (build_x_va_arg): Check if in a template decl. * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg. From-SVN: r34645
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/call.c3
-rw-r--r--gcc/cp/pt.c2
3 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 0699f15..e05c3d3 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
+
+ * call.c (build_x_va_arg): Check if in a template decl.
+ * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
+
2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (push_lang_context): TYPE_NAME gets you to the Java
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 7b7d96b..a155f10 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -3838,6 +3838,9 @@ build_x_va_arg (expr, type)
tree expr;
tree type;
{
+ if (processing_template_decl)
+ return build_min (VA_ARG_EXPR, type, expr);
+
type = complete_type_or_else (type, NULL_TREE);
if (expr == error_mark_node || !type)
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 70ad846..6fcc9e4 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -7099,7 +7099,7 @@ tsubst_copy (t, args, complain, in_decl)
}
case VA_ARG_EXPR:
- return build_va_arg (tsubst_copy (TREE_OPERAND (t, 0), args, complain,
+ return build_x_va_arg (tsubst_copy (TREE_OPERAND (t, 0), args, complain,
in_decl),
tsubst (TREE_TYPE (t), args, complain, in_decl));