re PR c++/77434 (warn about suspicious precedence of ternary operator (?:))
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 19 Sep 2016 22:10:11 +0000 (22:10 +0000)
committerBernd Edlinger <edlinger@gcc.gnu.org>
Mon, 19 Sep 2016 22:10:11 +0000 (22:10 +0000)
commit144a96e4c914710cacdb95d33f4e03dc9fed7655
treee93888863720e72051a26271bdd350b2c7f07917
parent3385d437fe1e17b7ba4735b5b6869e2153bfb506
re PR c++/77434 (warn about suspicious precedence of ternary operator (?:))

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.

From-SVN: r240251
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c.opt
gcc/cp/ChangeLog
gcc/cp/cvt.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wint-in-bool-context.c [new file with mode: 0644]