diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2016-10-03 08:00:21 +0000 |
---|---|---|
committer | Bernd Edlinger <edlinger@gcc.gnu.org> | 2016-10-03 08:00:21 +0000 |
commit | 1633d3b91af987aefd53b64cd4071923e1f45502 (patch) | |
tree | 93439ae229ea677d34c8945bc24e460dd4b880de /gcc/doc | |
parent | 21d7b03ca169ff93b6eb4e3432bf0e01a80819ba (diff) | |
download | gcc-1633d3b91af987aefd53b64cd4071923e1f45502.zip gcc-1633d3b91af987aefd53b64cd4071923e1f45502.tar.gz gcc-1633d3b91af987aefd53b64cd4071923e1f45502.tar.bz2 |
invoke.texi: Update -Wint-in-bool-context.
2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
* doc/invoke.texi: Update -Wint-in-bool-context.
c-family:
2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Warn for suspicious
left shift in boolean context.
cp:
2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
* parser.c (cp_parser_condition): Fix a warning.
testsuite:
2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-c++-common/Wint-in-bool-context.c: Update test.
From-SVN: r240706
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index fa15529..d9667e7 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -6038,7 +6038,8 @@ of the C++ standard. @opindex Wno-int-in-bool-context Warn for suspicious use of integer values where boolean values are expected, such as conditional expressions (?:) using non-boolean integer constants in -boolean context, like @code{if (a <= b ? 2 : 3)}. +boolean context, like @code{if (a <= b ? 2 : 3)}. Or left shifting in +boolean context, like @code{for (a = 0; 1 << a; a++);}. This warning is enabled by @option{-Wall}. @item -Wno-int-to-pointer-cast |