aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.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-decl.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-decl.c')
-rw-r--r--gcc/c-decl.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 3487aef..7db66d7 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -1550,7 +1550,7 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
break;
}
- if (simple_type_promotes_to (type) != NULL_TREE)
+ if (c_type_promotes_to (type) != type)
{
error ("an argument type that has a default promotion can't match an empty parameter name list declaration");
break;
@@ -4793,11 +4793,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
if (type == error_mark_node)
promoted_type = type;
else
- {
- promoted_type = simple_type_promotes_to (type);
- if (! promoted_type)
- promoted_type = type;
- }
+ promoted_type = c_type_promotes_to (type);
DECL_ARG_TYPE (decl) = promoted_type;
DECL_ARG_TYPE_AS_WRITTEN (decl) = type_as_written;