This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77434] warn about suspicious precedence of ternary operator (?:)
- From: "edlinger at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 19 Sep 2016 22:10:42 +0000
- Subject: [Bug c++/77434] warn about suspicious precedence of ternary operator (?:)
- Auto-submitted: auto-generated
- References: <bug-77434-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77434
--- Comment #12 from Bernd Edlinger <edlinger at gcc dot gnu.org> ---
Author: edlinger
Date: Mon Sep 19 22:10:11 2016
New Revision: 240251
URL: https://gcc.gnu.org/viewcvs?rev=240251&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/c-c++-common/Wint-in-bool-context.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/c-family/c.opt
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cvt.c
trunk/gcc/doc/invoke.texi
trunk/gcc/testsuite/ChangeLog