aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-format.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-04-19 06:22:18 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-04-19 06:22:18 +0000
commitab393bf17171d4e242ffd2fe637ae38322ab4d6e (patch)
treec853f107a81212ea73e1c0e425bd739bab49ff8e /gcc/c-format.c
parent58533fa280d2d55e932c8ed979e5ee167cdc7891 (diff)
downloadgcc-ab393bf17171d4e242ffd2fe637ae38322ab4d6e.zip
gcc-ab393bf17171d4e242ffd2fe637ae38322ab4d6e.tar.gz
gcc-ab393bf17171d4e242ffd2fe637ae38322ab4d6e.tar.bz2
builtins.c: Include langhooks.h.
* builtins.c: Include langhooks.h. (lang_type_promotes_to): Remove. (expand_builtin_va_arg): Use new hook. * c-common.c (c_common_nodes_and_builtins): Don't set hook. (simple_type_promotes_to): Move to c-typeck.c. * c-common.h (simple_type_promotes_to): Remove. * c-decl.c (duplicate_decls, grokdeclarator): Update. * c-format.c: Include langhooks.h. (check_format_types): Update. * c-tree.h (c_type_promotes_to): New. * c-typeck.c (c_type_promotes_to): Move from c-common.c. (type_lists_compatible_p): Update. * langhooks-def.h (lhd_type_promotes_to): New. (LANG_HOOKS_TYPE_PROMOTES_TO): New. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Update. * langhooks.c (lhd_type_promotes_to): New. * langhooks.h (struct lang_hooks_for_types): New hook. * tree.h (lang_type_promotes_to): Remove. cp: * call.c (convert_type_from_ellipsis): Rename, update. * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine. * cp-tree.h (convert_type_from_ellipsis): Rename. * decl.c (cxx_init_decl_processing): Don't set hook. objc: * objc-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine. From-SVN: r52512
Diffstat (limited to 'gcc/c-format.c')
-rw-r--r--gcc/c-format.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gcc/c-format.c b/gcc/c-format.c
index c121167..e5be439 100644
--- a/gcc/c-format.c
+++ b/gcc/c-format.c
@@ -27,7 +27,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "c-common.h"
#include "intl.h"
#include "diagnostic.h"
-
+#include "langhooks.h"
/* Command line options and their associated flags. */
@@ -2258,7 +2258,6 @@ check_format_types (status, types)
tree cur_type;
tree orig_cur_type;
tree wanted_type;
- tree promoted_type;
int arg_num;
int i;
int char_type_flag;
@@ -2277,11 +2276,7 @@ check_format_types (status, types)
abort ();
if (types->pointer_count == 0)
- {
- promoted_type = simple_type_promotes_to (wanted_type);
- if (promoted_type != NULL_TREE)
- wanted_type = promoted_type;
- }
+ wanted_type = (*lang_hooks.types.type_promotes_to) (wanted_type);
STRIP_NOPS (cur_param);