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: Marek Polacek <polacek at redhat dot com>
- To: Jason Merrill <jason 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 20:26:16 +0200
- 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> <53F38C58 dot 5070705 at redhat dot com>
On Tue, Aug 19, 2014 at 01:41:44PM -0400, Jason Merrill wrote:
> 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.
All right, will fix 'em.
> OK with those fixed.
Thanks!
Marek