diff options
Diffstat (limited to 'gcc/cp/typeck2.c')
-rw-r--r-- | gcc/cp/typeck2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index f42f0c2bf07..1e899ab17a1 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -913,7 +913,7 @@ check_narrowing (tree type, tree init, tsubst_flags_t complain, bool const_only) if (const_only && !TREE_CONSTANT (init)) return ok; - if (TREE_CODE (type) == INTEGER_TYPE + if (CP_INTEGRAL_TYPE_P (type) && TREE_CODE (ftype) == REAL_TYPE) ok = false; else if (INTEGRAL_OR_ENUMERATION_TYPE_P (ftype) |