diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-05 20:45:27 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-05 20:45:27 +0000 |
commit | 48dc22270749d443800d5ed71d2f0c07569febe1 (patch) | |
tree | 0065cd65b39b8419a3be598915506370819405f7 /gcc/tree-pretty-print.c | |
parent | dfa01d1ac0918d4e00fe5c139008def6c8c913ad (diff) | |
download | gcc-48dc22270749d443800d5ed71d2f0c07569febe1.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128150 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-pretty-print.c')
-rw-r--r-- | gcc/tree-pretty-print.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index 8da7ade6a11..bc7ebf4ea79 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -1228,6 +1228,15 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags, } } } + if (CALL_EXPR_VA_ARG_PACK (node)) + { + if (call_expr_nargs (node) > 0) + { + pp_character (buffer, ','); + pp_space (buffer); + } + pp_string (buffer, "__builtin_va_arg_pack ()"); + } pp_character (buffer, ')'); op1 = CALL_EXPR_STATIC_CHAIN (node); |