aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDirk Mueller <dmueller@suse.de>2006-01-24 13:29:10 +0000
committerDirk Mueller <mueller@gcc.gnu.org>2006-01-24 13:29:10 +0000
commit1dc8e905c035ca4dba5a12328ab3a763e6086ec2 (patch)
tree1e562ef6dc7ea3181cb6397e22b58e060f992a3d /gcc
parent1b3d28a8b96cd5ecab2e3c5c9c2a6a9f4dc67fd6 (diff)
downloadgcc-1dc8e905c035ca4dba5a12328ab3a763e6086ec2.zip
gcc-1dc8e905c035ca4dba5a12328ab3a763e6086ec2.tar.gz
gcc-1dc8e905c035ca4dba5a12328ab3a763e6086ec2.tar.bz2
typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning().
2006-01-24 Dirk Mueller <dmueller@suse.de> * typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning(). From-SVN: r110169
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/typeck.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3ff6c91..d373078 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2006-01-24 Dirk Mueller <dmueller@suse.de>
+
+ * typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning().
+
2006-01-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/25552
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 5eb4b64..e2853de 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -3087,8 +3087,9 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1,
case EQ_EXPR:
case NE_EXPR:
- if (warn_float_equal && (code0 == REAL_TYPE || code1 == REAL_TYPE))
- warning (0, "comparing floating point with == or != is unsafe");
+ if (code0 == REAL_TYPE || code1 == REAL_TYPE)
+ warning (OPT_Wfloat_equal,
+ "comparing floating point with == or != is unsafe");
if ((TREE_CODE (orig_op0) == STRING_CST && !integer_zerop (op1))
|| (TREE_CODE (orig_op1) == STRING_CST && !integer_zerop (op0)))
warning (OPT_Wstring_literal_comparison,