diff options
Diffstat (limited to 'gcc/c-family/c-common.c')
-rw-r--r-- | gcc/c-family/c-common.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index f50ca48f4f2..068a0bcd2ec 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -4650,7 +4650,9 @@ shorten_compare (location_t loc, tree *op0_ptr, tree *op1_ptr, type = c_common_unsigned_type (type); } - if (TREE_CODE (primop0) != INTEGER_CST) + if (TREE_CODE (primop0) != INTEGER_CST + /* Don't warn if it's from a macro. */ + && !from_macro_expansion_at (EXPR_LOCATION (primop0))) { if (val == truthvalue_false_node) warning_at (loc, OPT_Wtype_limits, |