diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-08-30 16:14:26 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-08-30 16:14:26 -0400 |
commit | 7fb90b988559af41c85e474aea29ba8f8b4c82f7 (patch) | |
tree | 79bab6ec12cdc8dc51815f30f5aa37ccdc6b69d6 | |
parent | fd48df3e75dbf1e7ab370d8d1aecbf522cfc893c (diff) | |
download | gcc-7fb90b988559af41c85e474aea29ba8f8b4c82f7.zip gcc-7fb90b988559af41c85e474aea29ba8f8b4c82f7.tar.gz gcc-7fb90b988559af41c85e474aea29ba8f8b4c82f7.tar.bz2 |
(convert_arguments): If PROMOTE_PROTOTYPE, promote all integral types
shorter than int, including short enums.
From-SVN: r5229
-rw-r--r-- | gcc/c-typeck.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 65623a7..3cea85d 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -2042,7 +2042,8 @@ convert_arguments (typelist, values, name, fundecl) /* Rather than truncating and then reextending, convert directly to int, if that's the type we will want. */ if (! flag_traditional - && TREE_CODE (type) == INTEGER_TYPE + && (TREE_CODE (type) == INTEGER_TYPE + || TREE_CODE (type) == ENUMERAL_TYPE) && (TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node))) type = integer_type_node; #endif @@ -2145,7 +2146,8 @@ convert_arguments (typelist, values, name, fundecl) fundecl, name, parmnum + 1); #ifdef PROMOTE_PROTOTYPES - if (TREE_CODE (type) == INTEGER_TYPE + if ((TREE_CODE (type) == INTEGER_TYPE + || TREE_CODE (type) == ENUMERAL_TYPE) && (TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node))) parmval = default_conversion (parmval); #endif |