diff options
author | Richard Henderson <rth@redhat.com> | 2001-04-30 16:59:10 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-04-30 16:59:10 -0700 |
commit | d72040f508bfc01489f0fca666cbb6e8ddfae896 (patch) | |
tree | 1e7389002ae91d660ddd3c0a718444a33765d0ae /gcc/c-common.h | |
parent | 901d43bcd00712e558ce9d408c788980b6823c13 (diff) | |
download | gcc-d72040f508bfc01489f0fca666cbb6e8ddfae896.zip gcc-d72040f508bfc01489f0fca666cbb6e8ddfae896.tar.gz gcc-d72040f508bfc01489f0fca666cbb6e8ddfae896.tar.bz2 |
c-common.c (c_promoting_integer_type_p): New function, from the corpse of old macro.
* c-common.c (c_promoting_integer_type_p): New function, from the
corpse of old macro. Properly promote too-small enumerations and
booleans. Adjust all callers.
* c-common.h (C_PROMOTING_INTEGER_TYPE_P): Remove.
(c_promoting_integer_type_p): Declare.
* c-decl.c: Adjust C_PROMOTING_INTEGER_TYPE_P invocations.
* c-typeck.c: Likewise.
(default_conversion): Remove now redundant boolean check.
* cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
* decl.c: Likewise.
From-SVN: r41709
Diffstat (limited to 'gcc/c-common.h')
-rw-r--r-- | gcc/c-common.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h index b9a7a9d..32d7ec9 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -533,17 +533,7 @@ extern tree build_va_arg PARAMS ((tree, tree)); extern void c_common_lang_init PARAMS ((void)); -/* Nonzero if the type T promotes to itself. - ANSI C states explicitly the list of types that promote; - in particular, short promotes to int even if they have the same width. */ -#define C_PROMOTING_INTEGER_TYPE_P(t) \ - (TREE_CODE ((t)) == INTEGER_TYPE \ - && (TYPE_MAIN_VARIANT (t) == char_type_node \ - || TYPE_MAIN_VARIANT (t) == signed_char_type_node \ - || TYPE_MAIN_VARIANT (t) == unsigned_char_type_node \ - || TYPE_MAIN_VARIANT (t) == short_integer_type_node \ - || TYPE_MAIN_VARIANT (t) == short_unsigned_type_node)) - +extern bool c_promoting_integer_type_p PARAMS ((tree)); extern int self_promoting_args_p PARAMS ((tree)); extern tree simple_type_promotes_to PARAMS ((tree)); extern tree strip_array_types PARAMS ((tree)); |