From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5898 invoked by alias); 19 Feb 2015 13:39:43 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 5861 invoked by uid 48); 19 Feb 2015 13:39:39 -0000 From: "jirislaby at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/65120] New: [gcc5] Wlogical-not-parentheses should not wanr about double exclamation !! Date: Thu, 19 Feb 2015 13:39:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jirislaby at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg02109.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65120 Bug ID: 65120 Summary: [gcc5] Wlogical-not-parentheses should not wanr about double exclamation !! Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: jirislaby at gmail dot com While warning about "if (!a == b)" is perfectly fine and I like it, I do not like warning about "if (!!a = b)" at all. It generates plenty of false positives (in the Linux kernel at least) and I doubt it can warn about an error at all. Better than papering over this as "if ((!aa) = b)" or by -Wno-logical-not-parentheses does not make much sense to me (opposing to the single ! case). Note: this is all about: "logical not is only applied to the left hand side of comparison"