call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
authorJohn David Anglin <dave@hiauly1.hia.nrc.ca>
Wed, 6 Jun 2001 17:10:52 +0000 (17:10 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Wed, 6 Jun 2001 17:10:52 +0000 (17:10 +0000)
* call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
(build_over_call): Likewise.
* decl.c (grokparms): Likewise.
* pt.c (tsubst_decl): Likewise.
* typeck.c (convert_arguments): Likewise.

From-SVN: r42947

gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/decl.c
gcc/cp/pt.c
gcc/cp/typeck.c

index 829c4da9cbabcc353565d5912e79f6f17380cde7..4e458c549caf0690c54b49fd2496b12fb0b7b464 100644 (file)
@@ -1,3 +1,11 @@
+2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+       * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
+       (build_over_call): Likewise.
+       * decl.c (grokparms): Likewise.
+       * pt.c (tsubst_decl): Likewise.
+       * typeck.c (convert_arguments): Likewise.
+
 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
 
        * semantics.c (begin_class_definition): Robustify.
index f2478ed5e6ed0dee4ead0a004bd9513b578b1b84..f09659acbcc3bf57d6b933c967fcad427874d086 100644 (file)
@@ -4054,8 +4054,7 @@ convert_default_arg (type, arg, fn, parmnum)
       arg = convert_for_initialization (0, type, arg, LOOKUP_NORMAL,
                                        "default argument", fn, parmnum);
       if (PROMOTE_PROTOTYPES
-         && (TREE_CODE (type) == INTEGER_TYPE
-             || TREE_CODE (type) == ENUMERAL_TYPE)
+         && INTEGRAL_TYPE_P (type)
          && (TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)))
        arg = default_conversion (arg);
     }
@@ -4171,8 +4170,7 @@ build_over_call (cand, args, flags)
        }
 
       if (PROMOTE_PROTOTYPES
-         && (TREE_CODE (type) == INTEGER_TYPE
-             || TREE_CODE (type) == ENUMERAL_TYPE)
+         && INTEGRAL_TYPE_P (type)
          && (TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)))
        val = default_conversion (val);
       converted_args = tree_cons (NULL_TREE, val, converted_args);
index 8bb6c7a7ccaf25f819e8566e3b329fb3a5f69b82..ed5686c501f486656561f25dc63f5be944134e6f 100644 (file)
@@ -11970,8 +11970,7 @@ grokparms (first_parm)
 
          DECL_ARG_TYPE (decl) = TREE_TYPE (decl);
          if (PROMOTE_PROTOTYPES
-             && (TREE_CODE (type) == INTEGER_TYPE
-                 || TREE_CODE (type) == ENUMERAL_TYPE)
+             && INTEGRAL_TYPE_P (type)
              && TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node))
            DECL_ARG_TYPE (decl) = integer_type_node;
          if (!any_error && init)
index b82ac028f64fbc6e5006da13d80a231a4f147a96..1c9e6593a3062edc87a3c7414b2b6f3732a23e3d 100644 (file)
@@ -5883,8 +5883,7 @@ tsubst_decl (t, args, type)
 
        DECL_CONTEXT (r) = NULL_TREE;
        if (PROMOTE_PROTOTYPES
-           && (TREE_CODE (type) == INTEGER_TYPE
-               || TREE_CODE (type) == ENUMERAL_TYPE)
+           && INTEGRAL_TYPE_P (type)
            && TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node))
          DECL_ARG_TYPE (r) = integer_type_node;
        if (TREE_CHAIN (t))
index 209b682ef8af2835e62695aa091360c6cba616e1..01805c664faac8864ff10757f8c2209aa7a76d5b 100644 (file)
@@ -3234,8 +3234,7 @@ convert_arguments (typelist, values, fndecl, flags)
                (NULL_TREE, type, val, flags,
                 "argument passing", fndecl, i);
              if (PROMOTE_PROTOTYPES
-                 && (TREE_CODE (type) == INTEGER_TYPE
-                     || TREE_CODE (type) == ENUMERAL_TYPE)
+                 && INTEGRAL_TYPE_P (type)
                  && (TYPE_PRECISION (type)
                      < TYPE_PRECISION (integer_type_node)))
                parmval = default_conversion (parmval);