On 03/09/2015 10:34 AM, Jakub Jelinek wrote:
On Fri, Feb 27, 2015 at 05:29:47PM -0500, Jason Merrill wrote:
On 02/19/2015 07:03 PM, Jakub Jelinek wrote:
+ /* Avoid warning for !!b == y where b is boolean. */
+ && (!DECL_P (current.lhs)
+ || TREE_TYPE (current.lhs) =
On Fri, Feb 27, 2015 at 05:29:47PM -0500, Jason Merrill wrote:
> On 02/19/2015 07:03 PM, Jakub Jelinek wrote:
> >+ /* Avoid warning for !!b == y where b is boolean. */
> >+ && (!DECL_P (current.lhs)
> >+ || TREE_TYPE (current.lhs) == NULL_TREE
> >+ || TREE_CODE (TREE_TY
On 02/19/2015 07:03 PM, Jakub Jelinek wrote:
+ /* Avoid warning for !!b == y where b is boolean. */
+ && (!DECL_P (current.lhs)
+ || TREE_TYPE (current.lhs) == NULL_TREE
+ || TREE_CODE (TREE_TYPE (current.lhs)) != BOOLEAN_TYPE))
There's something wrong h
On Fri, Feb 20, 2015 at 04:35:05PM +0100, Marek Polacek wrote:
> Note that first version of -Wlogical-not-parentheses didn't warn
> when LHS had a boolean type, this has been changed later on. I have
> no strong preference either way.
>
> > As the argument is already folded, it isn't easy to dete
On Fri, Feb 20, 2015 at 01:03:26AM +0100, Jakub Jelinek wrote:
> Hi!
>
> As reported, !!x == y is quite common in the Linux kernel
> and unlike the !x == y case it usually doesn't mean mistyped
> !(x == y) or x != y. clang++ apparently doesn't warn about that
> either, and it doesn't warn even ab
Hi!
As reported, !!x == y is quite common in the Linux kernel
and unlike the !x == y case it usually doesn't mean mistyped
!(x == y) or x != y. clang++ apparently doesn't warn about that
either, and it doesn't warn even about the case where ! is applied
to a bool. As the argument is already fold