From 4bbbc5d906d1363fa6ca5fdf587c579120756a71 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Sun, 11 Jul 1993 22:44:54 +0000 Subject: [PATCH] (convert_arguments): Don't warn about sign change for an INTEGER_CST inside NOP_EXPR, if value not fits new type. (convert_arguments): Don't warn about sign change for an INTEGER_CST inside NOP_EXPR, if value not fits new type. Delete the code to check for VAL having enumeration type. From-SVN: r4906 --- gcc/c-typeck.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 31aa96df999..68c89466144 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -2073,12 +2073,19 @@ convert_arguments (typelist, values, name, fundecl) /* Change in signedness doesn't matter if a constant value is unaffected. */ ; + /* Likewise for a constant in a NOP_EXPR. */ + else if (TREE_CODE (val) == NOP_EXPR + && TREE_CODE (TREE_OPERAND (val, 0)) == INTEGER_CST + && int_fits_type_p (TREE_OPERAND (val, 0), type)) + ; +#if 0 /* We never get such tree structure here. */ else if (TREE_CODE (TREE_TYPE (val)) == ENUMERAL_TYPE && int_fits_type_p (TYPE_MIN_VALUE (TREE_TYPE (val)), type) && int_fits_type_p (TYPE_MAX_VALUE (TREE_TYPE (val)), type)) /* Change in signedness doesn't matter if an enum value is unaffected. */ ; +#endif /* If the value is extended from a narrower unsigned type, it doesn't matter whether we pass it as signed or unsigned; the value -- 2.30.2