From: mueller Date: Tue, 24 Jan 2006 13:29:10 +0000 (+0000) Subject: 2006-01-24 Dirk Mueller X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=4fd216d574350d23961db14d4b25f74ed20905f8;hp=a32f68f58d919e02f885b817337f5ad369dfd156 2006-01-24 Dirk Mueller * typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning(). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110169 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3ff6c91434c..d373078c997 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2006-01-24 Dirk Mueller + + * typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning(). + 2006-01-24 Volker Reichelt PR c++/25552 diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 5eb4b644426..e2853de98e9 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,