This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C/C++ PATCH] Implement -Wbool-compare (PR c++/62153)
- From: Jason Merrill <jason at redhat dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Tue, 19 Aug 2014 13:41:44 -0400
- Subject: Re: [C/C++ PATCH] Implement -Wbool-compare (PR c++/62153)
- Authentication-results: sourceware.org; auth=none
- References: <20140818200433 dot GD11974 at redhat dot com> <53F25DC9 dot 1020004 at redhat dot com> <20140818202349 dot GE11974 at redhat dot com> <20140819165227 dot GG14320 at redhat dot com>
On 08/19/2014 12:52 PM, Marek Polacek wrote:
+ tree cst = TREE_CODE (op0) == INTEGER_CST
+ ? op0 : TREE_CODE (op1) == INTEGER_CST ? op1 : NULL_TREE;
This indentation won't survive Emacs auto-indent; please add parentheses.
+ int sign = TREE_CODE (op0) == INTEGER_CST
+ ? tree_int_cst_sgn (cst) : -tree_int_cst_sgn (cst);
Likewise.
OK with those fixed.
Jason