summaryrefslogtreecommitdiff
path: root/gcc/cp/cvt.c
diff options
context:
space:
mode:
authoredlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>2016-09-19 22:10:11 +0000
committeredlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>2016-09-19 22:10:11 +0000
commitbed03df11f9b17ec17519a8aa3e4762d64abcfec (patch)
treee93888863720e72051a26271bdd350b2c7f07917 /gcc/cp/cvt.c
parentb0e5fdf725468c9fa09d0a11bb857de06a230eb5 (diff)
downloadgcc-bed03df11f9b17ec17519a8aa3e4762d64abcfec.tar.gz
gcc:
2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c++/77434 * doc/invoke.texi: Document -Wint-in-bool-context. c-family: 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c++/77434 * c.opt (Wcond-in-bool-context): New warning. * c-common.c (c_common_truthvalue_conversion): Warn on integer constants in boolean context. cp: 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c++/77434 * cvt.c (cp_convert_and_check): Suppress Wint-in-bool-context here. testsuite: 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c++/77434 * c-c++-common/Wint-in-bool-context.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240251 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r--gcc/cp/cvt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index 977c6652211..2f5f15a2c82 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -645,6 +645,7 @@ cp_convert_and_check (tree type, tree expr, tsubst_flags_t complain)
{
/* Avoid bogus -Wparentheses warnings. */
warning_sentinel w (warn_parentheses);
+ warning_sentinel c (warn_int_in_bool_context);
folded_result = cp_convert (type, folded, tf_none);
}
folded_result = fold_simple (folded_result);