diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2000-09-19 18:19:44 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2000-09-19 18:19:44 +0000 |
commit | ad3fd36f73012aa44ee7f55d09a2a2b87ce9dd6e (patch) | |
tree | 61dfe2eae6401356a44aaf263dd08431cc930e4e /gcc/tree.h | |
parent | 6f3d20a02285d63fa46862f6fffda3153956f246 (diff) | |
download | gcc-ad3fd36f73012aa44ee7f55d09a2a2b87ce9dd6e.zip gcc-ad3fd36f73012aa44ee7f55d09a2a2b87ce9dd6e.tar.gz gcc-ad3fd36f73012aa44ee7f55d09a2a2b87ce9dd6e.tar.bz2 |
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
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2441,6 +2441,9 @@ extern const char * const language_string; extern tree builtin_function PARAMS ((const char *, tree, int, enum built_in_class, const char *)); +/* Pointer to function to check the format of printf, etc. This is + used by the backend, e.g. builtins.c. */ +extern void (*check_function_format_ptr) PARAMS ((int *, tree, tree, tree)); /* In tree.c */ extern char *perm_calloc PARAMS ((int, long)); |