From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6C77D386F439; Mon, 20 Apr 2020 19:45:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C77D386F439 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587411903; bh=pOC2cBu6XG0fmaSfxuXFua9xOBgUNdqajDUzdSko3jk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dEduMxGw+UlGXtY6BYhU1ue9NvIY+mD1/oX8HEOKXNEZBlMlgZWBINS372YagxSDf TXBp3/22Ucd0rZr5Txq/47POuyu/TWytKea53doW6HgRrP1s8N4X/d4e9SONA+OiXp rNpOS5d50z/SW6NZ/Jpy4D3GUmm7AbRSJ16RwPnw= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94505] Logical operator inside fold-expression: strange warning Date: Mon, 20 Apr 2020 19:45:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 19:45:03 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94505 --- Comment #2 from CVS Commits --- The releases/gcc-9 branch has been updated by Marek Polacek : https://gcc.gnu.org/g:83eeda5f004c3b9cbeccd3da1c3fe58b3015e55f commit r9-8518-g83eeda5f004c3b9cbeccd3da1c3fe58b3015e55f Author: Marek Polacek Date: Mon Apr 20 15:43:49 2020 -0400 c++: Fix bogus -Wparentheses warning with fold-expression [PR94505] We issue bogus -Wparentheses warnings (3 of them!) for this fold expression: ((B && true) || ...) Firstly, issuing a warning for a compiler-generated expression is wrong and secondly, B && true must be wrapped in ( ) otherwise you'll get error: binary expression in operand of fold-expression. PR c++/94505 - bogus -Wparentheses warning with fold-expression. * pt.c (fold_expression): Add warning_sentinel for -Wparentheses before calling build_x_binary_op. * g++.dg/cpp1z/fold11.C: New test.=