summaryrefslogtreecommitdiff
path: root/gcc/c-family/c-common.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-17 18:16:35 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-17 18:16:35 +0000
commit7991eeee5bbef43132820f4cb414690cf804d66f (patch)
treea287eb144d579d831d29ac162fbecfaac0eda88a /gcc/c-family/c-common.c
parent93a735edb363048fdfccb762d646fe27c48cc9d8 (diff)
downloadgcc-7991eeee5bbef43132820f4cb414690cf804d66f.tar.gz
PR bootstrap/68346
* c-common.c (warn_tautological_cmp): Fold before checking for constants. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230471 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family/c-common.c')
-rw-r--r--gcc/c-family/c-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 06d857cc970..f50ca48f4f2 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -1924,7 +1924,7 @@ warn_tautological_cmp (location_t loc, enum tree_code code, tree lhs, tree rhs)
/* We do not warn for constants because they are typical of macro
expansions that test for features, sizeof, and similar. */
- if (CONSTANT_CLASS_P (lhs) || CONSTANT_CLASS_P (rhs))
+ if (CONSTANT_CLASS_P (fold (lhs)) || CONSTANT_CLASS_P (fold (rhs)))
return;
/* Don't warn for e.g.