parser.c (cp_parser_binary_expression): Increment c_inhibit_evaluation_warnings while...
authorIan Lance Taylor <iant@google.com>
Thu, 25 Jun 2009 19:03:28 +0000 (19:03 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 25 Jun 2009 19:03:28 +0000 (19:03 +0000)
commit98f80e918ed957896fe0fd1cf0329aa8d2f68feb
treea411b6dc70072c2588e2d8f18097acf381dc3921
parent777a3a6a0c4e144f0a97fd807c0a16d8ab8541be
parser.c (cp_parser_binary_expression): Increment c_inhibit_evaluation_warnings while parsing the right hand side of...

cp/:
* parser.c (cp_parser_binary_expression): Increment
c_inhibit_evaluation_warnings while parsing the right hand side of
"true || x" or "false && x".
* typeck.c (cp_build_binary_op): Only call warn_for_sign_compare
if c_inhibit_evaluation_warnings is zero.
testsuite/:
* g++.dg/warn/skip-2.C: New testcase.

From-SVN: r148949
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/skip-2.C [new file with mode: 0644]