builtins.c (is_valid_printf_arglist, [...]): New functions.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Tue, 19 Sep 2000 18:19:44 +0000 (18:19 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Tue, 19 Sep 2000 18:19:44 +0000 (18:19 +0000)
commitad3fd36f73012aa44ee7f55d09a2a2b87ce9dd6e
tree61dfe2eae6401356a44aaf263dd08431cc930e4e
parent6f3d20a02285d63fa46862f6fffda3153956f246
builtins.c (is_valid_printf_arglist, [...]): New functions.

* builtins.c (is_valid_printf_arglist, expand_builtin_printf): New
functions.
(expand_builtin_fputs): Set `target' parameter for `expand_expr'.
(expand_builtin): Handle BUILT_IN_PUTCHAR, BUILT_IN_PUTS and
BUILT_IN_PRINTF.

* builtins.def (BUILT_IN_PUTCHAR, BUILT_IN_PUTS, BUILT_IN_PRINTF):
New entries.

* c-common.c (init_function_format_info): Handle __builtin_printf.
Set `check_function_format_ptr'.
(c_common_nodes_and_builtins): Set `puts_ftype' and
`printf_ftype'.  Declare __builtin_putchar, __builtin_puts,
__builtin_printf and printf.

* tree.c, tree.h (check_function_format_ptr): Declare.

testsuite:
* g++.old-deja/g++.other/virtual8.C: Declare printf correctly.

From-SVN: r36540
gcc/ChangeLog
gcc/builtins.c
gcc/builtins.def
gcc/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.other/virtual8.C
gcc/tree.c
gcc/tree.h