From 6e5bc2c65edf9573912837fc9a1ed34ece003ed6 Mon Sep 17 00:00:00 2001 From: danglin Date: Wed, 6 Jun 2001 17:10:52 +0000 Subject: [PATCH] * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42947 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 8 ++++++++ gcc/cp/call.c | 6 ++---- gcc/cp/decl.c | 3 +-- gcc/cp/pt.c | 3 +-- gcc/cp/typeck.c | 3 +-- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 829c4da..4e458c5 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,11 @@ +2001-06-06 John David Anglin + + * 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 * semantics.c (begin_class_definition): Robustify. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index f2478ed..f09659a 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -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); diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 8bb6c7a..ed5686c 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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) diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index b82ac02..1c9e659 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -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)) diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 209b682..01805c6 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -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); -- 2.7.4