aboutsummaryrefslogtreecommitdiff
path: root/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Sema/SemaExpr.cpp')
-rw-r--r--Sema/SemaExpr.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp
index 9208db26a8..b613cd90a2 100644
--- a/Sema/SemaExpr.cpp
+++ b/Sema/SemaExpr.cpp
@@ -1157,6 +1157,9 @@ inline QualType Sema::CheckCompareOperands( // C99 6.5.8
if (lType->isRealType() && rType->isRealType())
return Context.IntTy;
} else {
+ if (lType->isRealType() && rType->isRealType())
+ Diag(loc, diag::warn_floatingpoint_eq);
+
if (lType->isArithmeticType() && rType->isArithmeticType())
return Context.IntTy;
}