summaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-19 06:22:18 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-19 06:22:18 +0000
commit63c62881d96d32d9d89b2c42c9321c4a6b74920c (patch)
treec853f107a81212ea73e1c0e425bd739bab49ff8e /gcc/builtins.c
parent7b185825b67a707f5510774ddec015bcec214e22 (diff)
downloadgcc-63c62881d96d32d9d89b2c42c9321c4a6b74920c.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52512 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index dcbc6dab23e..a1ffe0a1d69 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -41,6 +41,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "predict.h"
#include "tm_p.h"
#include "target.h"
+#include "langhooks.h"
#define CALLED_AS_BUILT_IN(NODE) \
(!strncmp (IDENTIFIER_POINTER (DECL_NAME (NODE)), "__builtin_", 10))
@@ -72,8 +73,6 @@ const char *const built_in_names[(int) END_BUILTINS] =
initialized to NULL_TREE. */
tree built_in_decls[(int) END_BUILTINS];
-tree (*lang_type_promotes_to) PARAMS ((tree));
-
static int get_pointer_alignment PARAMS ((tree, unsigned int));
static tree c_strlen PARAMS ((tree));
static const char *c_getstr PARAMS ((tree));
@@ -3083,7 +3082,8 @@ expand_builtin_va_arg (valist, type)
/* Generate a diagnostic for requesting data of a type that cannot
be passed through `...' due to type promotion at the call site. */
- else if ((promoted_type = (*lang_type_promotes_to) (type)) != NULL_TREE)
+ else if ((promoted_type = (*lang_hooks.types.type_promotes_to) (type))
+ != type)
{
const char *name = "<anonymous type>", *pname = 0;
static bool gave_help;