Commit 1dc8e905 by Dirk Mueller Committed by Dirk Mueller

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
parent 1b3d28a8
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> 2006-01-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/25552 PR c++/25552
......
...@@ -3087,8 +3087,9 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1, ...@@ -3087,8 +3087,9 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1,
case EQ_EXPR: case EQ_EXPR:
case NE_EXPR: case NE_EXPR:
if (warn_float_equal && (code0 == REAL_TYPE || code1 == REAL_TYPE)) if (code0 == REAL_TYPE || code1 == REAL_TYPE)
warning (0, "comparing floating point with == or != is unsafe"); warning (OPT_Wfloat_equal,
"comparing floating point with == or != is unsafe");
if ((TREE_CODE (orig_op0) == STRING_CST && !integer_zerop (op1)) if ((TREE_CODE (orig_op0) == STRING_CST && !integer_zerop (op1))
|| (TREE_CODE (orig_op1) == STRING_CST && !integer_zerop (op0))) || (TREE_CODE (orig_op1) == STRING_CST && !integer_zerop (op0)))
warning (OPT_Wstring_literal_comparison, warning (OPT_Wstring_literal_comparison,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment