aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2007-09-05 22:45:27 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2007-09-05 22:45:27 +0200
commit6ef5231bdf52aba0854491d24ab30bebd8f2ab0a (patch)
tree0065cd65b39b8419a3be598915506370819405f7 /gcc/tree.h
parente050d7958c2fc910926d046fe1e72a513a580489 (diff)
downloadgcc-6ef5231bdf52aba0854491d24ab30bebd8f2ab0a.zip
gcc-6ef5231bdf52aba0854491d24ab30bebd8f2ab0a.tar.gz
gcc-6ef5231bdf52aba0854491d24ab30bebd8f2ab0a.tar.bz2
builtins.def (BUILT_IN_VA_ARG_PACK): New built-in.
* builtins.def (BUILT_IN_VA_ARG_PACK): New built-in. * tree.h (CALL_EXPR_VA_ARG_PACK): Define. * tree-inline.h (copy_body_data): Add call_expr field. * tree-inline.c (expand_call_inline): Initialize call_expr. (copy_bb): Append anonymous inline fn arguments to arguments when inlining a CALL_EXPR_VA_ARG_PACK call. * builtins.c (expand_builtin): Issue an error if BUILT_IN_VA_ARG_PACK is seen during expand. (fold_call_expr, fold_builtin_call_array): Don't fold CALL_EXPR_VA_ARG_PACK CALL_EXPRs or calls with __builtin_va_arg_pack () call as last argument. * gimplify.c (gimplify_call_expr): If last argument to a vararg function is __builtin_va_arg_pack (), decrease number of call arguments and instead set CALL_EXPR_VA_ARG_PACK on the CALL_EXPR. * expr.c (expand_expr_real_1): Issue an error if CALL_EXPR_VA_ARG_PACK CALL_EXPR is seen during expand. * tree-pretty-print.c (dump_generic_node): Handle printing CALL_EXPR_VA_ARG_PACK bit on CALL_EXPRs. * doc/extend.texi (__builtin_va_arg_pack): Document. * gcc.c-torture/execute/va-arg-pack-1.c: New test. * gcc.dg/va-arg-pack-1.c: New test. From-SVN: r128150
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 5fda4d4..c274fb6 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -464,6 +464,8 @@ struct gimple_stmt GTY(())
VAR_DECL or FUNCTION_DECL or IDENTIFIER_NODE
ASM_VOLATILE_P in
ASM_EXPR
+ CALL_EXPR_VA_ARG_PACK in
+ CALL_EXPR
TYPE_CACHED_VALUES_P in
..._TYPE
SAVE_EXPR_RESOLVED_P in
@@ -1222,6 +1224,11 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
#define SAVE_EXPR_RESOLVED_P(NODE) \
(TREE_CHECK (NODE, SAVE_EXPR)->base.public_flag)
+/* Set on a CALL_EXPR if this stdarg call should be passed the argument
+ pack. */
+#define CALL_EXPR_VA_ARG_PACK(NODE) \
+ (CALL_EXPR_CHECK(NODE)->base.public_flag)
+
/* In any expression, decl, or constant, nonzero means it has side effects or
reevaluation of the whole expression could produce a different value.
This is set if any subexpression is a function call, a side effect or a