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/cp | |
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/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/cvt.c | 2 | ||||
-rw-r--r-- | gcc/cp/decl.c | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1d0f7ce..e952168 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2001-04-30 Richard Henderson <rth@redhat.com> + + * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations. + * decl.c: Likewise. + 2001-04-30 Mark Mitchell <mark@codesourcery.com> * gxxint.texi: Remove. diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 1f74eb4..f247699 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -1258,7 +1258,7 @@ type_promotes_to (type) else type = totype; } - else if (C_PROMOTING_INTEGER_TYPE_P (type)) + else if (c_promoting_integer_type_p (type)) { /* Retain unsignedness if really not getting bigger. */ if (TREE_UNSIGNED (type) diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 246cbd7..da63679 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -13602,7 +13602,7 @@ start_function (declspecs, declarator, attrs, flags) cplus_decl_attributes (decl1, NULL_TREE, attrs); /* Promote the value to int before returning it. */ - if (C_PROMOTING_INTEGER_TYPE_P (restype)) + if (c_promoting_integer_type_p (restype)) restype = type_promotes_to (restype); if (DECL_RESULT (decl1) == NULL_TREE) |