re PR c/19999 (-Wfloat-equal does not warn for complex numbers)
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 22 Feb 2008 06:17:46 +0000 (06:17 +0000)
committerRalf Wildenhues <rwild@gcc.gnu.org>
Fri, 22 Feb 2008 06:17:46 +0000 (06:17 +0000)
commitae3115664af05ea853e101ea812148a12c5ed96b
tree3f5c89f2924defd243a7584af42364ce079bb2fd
parent24219f12064acaa1575b66a9f498e8bc7b4894f9
re PR c/19999 (-Wfloat-equal does not warn for complex numbers)

gcc/:
PR c/19999
* c-typeck.c (build_binary_op): Warn about floating point
comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.

gcc/cp/:
* typeck.c (build_binary_op): Warn about floating point
comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.

gcc/testsuite/:
* gcc.dg/Wfloat-equal-1.c: New.
* g++.dg/warn/Wfloat-equal-1.C: New.

From-SVN: r132540
gcc/ChangeLog
gcc/c-typeck.c
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wfloat-equal-1.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wfloat-equal-1.c [new file with mode: 0644]