Fix c++/27975.
authorMichael Matz <matz@suse.de>
Tue, 27 May 2008 14:59:53 +0000 (14:59 +0000)
committerMichael Matz <matz@gcc.gnu.org>
Tue, 27 May 2008 14:59:53 +0000 (14:59 +0000)
commita32990968ed7264a23f0546123a1384f6a0e4db5
tree84a5efdf2524b5d4d60576bac68ba49309e5a146
parentbd42a56bb4d7a4a39b08eceee7eff87d3264a9c2
Fix c++/27975.

        * c.opt (Wenum-compare): New warning option.
        * doc/invoke.texi (Warning Options): Document -Wenum-compare.

cp/
        * call.c (build_new_op): Make warning conditional on OPT_Wenum_compare.

testsuite/
        * g++.dg/warn/Wenum-compare.C: New testcase.
        * g++.dg/warn/Wenum-compare-no.C: Ditto.

From-SVN: r136035
gcc/ChangeLog
gcc/c.opt
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wenum-compare-no.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Wenum-compare.C [new file with mode: 0644]