Message ID | AM4PR0701MB2162E00D301C42E4ABDA9348E4D90@AM4PR0701MB2162.eurprd07.prod.outlook.com |
---|---|
State | New |
Headers | show
Return-Path: <gcc-patches-return-438027-incoming=patchwork.ozlabs.org@gcc.gnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sry7L1p5tz9ryv for <incoming@patchwork.ozlabs.org>; Sun, 9 Oct 2016 07:05:48 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=nTrFzJfD; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:content-id:content-transfer-encoding:mime-version; q=dns; s=default; b=dKGIjzkoyyVLDBoBiEJKRFE/pSglFkGYRg9pKy+XVqp eCXJX6k5epaUT4Z626ynmRTwPlK6HuSXkjpTarYKv46EDXVp+xttjXeBULVB1nbu aVBHJ3sihP4W85r5ZESvnv7OIRo7vRLcYhat8zwAuSr9y9+vQ6BUu00C0zwSXtAU = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:content-id:content-transfer-encoding:mime-version; s=default; bh=hQ4NJoJWTVNK3zJm/Ifh4DFpaTs=; b=nTrFzJfD0oRWDun3a 1DKkP8StNh1VhL04C5VFZcAVFw/tEsUguLWmqo/yIvk+7uxd1FASK0PAWpSjfe5A 9d88x5C/QF1gyE18CZU0Zw/dD9tV9NShf3ifJ5CwCeCAy2jrv/oMywb2BXknMCWg sn3SE7mQJ3t9f7TK+//0zfX4Y0= Received: (qmail 11106 invoked by alias); 8 Oct 2016 20:05:39 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-patches.gcc.gnu.org> List-Unsubscribe: <mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-help@gcc.gnu.org> Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 11096 invoked by uid 89); 8 Oct 2016 20:05:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=AWL, BAYES_50, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Distribute, adjust_packed, sk:type_co, COND_EXPR X-HELO: BLU004-OMC1S6.hotmail.com Received: from blu004-omc1s6.hotmail.com (HELO BLU004-OMC1S6.hotmail.com) (65.55.116.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Oct 2016 20:05:27 +0000 Received: from EUR03-AM5-obe.outbound.protection.outlook.com ([65.55.116.9]) by BLU004-OMC1S6.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Sat, 8 Oct 2016 13:05:26 -0700 Received: from VE1EUR03FT024.eop-EUR03.prod.protection.outlook.com (10.152.18.53) by VE1EUR03HT020.eop-EUR03.prod.protection.outlook.com (10.152.19.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.629.5; Sat, 8 Oct 2016 20:05:24 +0000 Received: from AM4PR0701MB2162.eurprd07.prod.outlook.com (10.152.18.57) by VE1EUR03FT024.mail.protection.outlook.com (10.152.18.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.629.5 via Frontend Transport; Sat, 8 Oct 2016 20:05:24 +0000 Received: from AM4PR0701MB2162.eurprd07.prod.outlook.com ([10.167.132.147]) by AM4PR0701MB2162.eurprd07.prod.outlook.com ([10.167.132.147]) with mapi id 15.01.0659.015; Sat, 8 Oct 2016 20:05:24 +0000 From: Bernd Edlinger <bernd.edlinger@hotmail.de> To: Jason Merrill <jason@redhat.com> CC: Florian Weimer <fw@deneb.enyo.de>, "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>, Jeff Law <law@redhat.com> Subject: Re: [PATCH] Make -Wint-in-bool-context warn on suspicious shift ops Date: Sat, 8 Oct 2016 20:05:24 +0000 Message-ID: <AM4PR0701MB2162E00D301C42E4ABDA9348E4D90@AM4PR0701MB2162.eurprd07.prod.outlook.com> References: <AM4PR0701MB2162CF4DE9EAAFFE605F4BB0E4CA0@AM4PR0701MB2162.eurprd07.prod.outlook.com> <87fuol77ri.fsf@mid.deneb.enyo.de> <HE1PR0701MB21694CB05881916BDFF3A251E4CC0@HE1PR0701MB2169.eurprd07.prod.outlook.com> <CADzB+2n085rFdKy5AQuffwjnGOYMdR0zNzbbKJGJT+KrXUdFHA@mail.gmail.com> <HE1PR0701MB21692B89F7F6754AB32594EEE4CC0@HE1PR0701MB2169.eurprd07.prod.outlook.com> <CADzB+2=pWuj6AUQFKAbc=f+pq616+Gx6tCNwzPU_e4Dp84PY4g@mail.gmail.com> <AM4PR0701MB2162EC708CAF70C79B380A62E4CF0@AM4PR0701MB2162.eurprd07.prod.outlook.com> <CADzB+2kzJk5N5RctXS_SM1b2FKH8R8hAkbXK7RxzEtNaD2iqPg@mail.gmail.com> <AM4PR0701MB216289DC52D6AA7A184F9821E4CE0@AM4PR0701MB2162.eurprd07.prod.outlook.com> <AM4PR0701MB2162D459F858784668E47F78E4CE0@AM4PR0701MB2162.eurprd07.prod.outlook.com> <CADzB+2k9EFRaS3AzppHBsT-hSaYgMy4qTKCVviFbVGcBV2V7iw@mail.gmail.com> <AM4PR0701MB216221175254CF5C35B6D372E4C10@AM4PR0701MB2162.eurprd07.prod.outlook.com> <CADzB+2kx9NV0zCORYhG+Q36dZpbGd7uj2U7FYZinwhq8Vz9x4Q@mail.gmail.com> In-Reply-To: <CADzB+2kx9NV0zCORYhG+Q36dZpbGd7uj2U7FYZinwhq8Vz9x4Q@mail.gmail.com> authentication-results: spf=softfail (sender IP is 10.152.18.57) smtp.mailfrom=hotmail.de; redhat.com; dkim=none (message not signed) header.d=none; redhat.com; dmarc=none action=none header.from=hotmail.de; received-spf: SoftFail (protection.outlook.com: domain of transitioning hotmail.de discourages use of 10.152.18.57 as permitted sender) x-ms-exchange-messagesentrepresentingtype: 1 x-eopattributedmessage: 0 x-microsoft-exchange-diagnostics: 1; VE1EUR03HT020; 6:jfKUV4gkubXO+PudBg8ls8+9fH1k5lA4Cd/B4aAg06HZrE0o+lDe1Bvd4rLQdkGV6R3mAjKOAmoz1uZNPYgqhTLf6+AtUkbvngNX3gyDkYEhaxT1k6tzzbh/wxoxVEQL23BOFmmrOdVf26Fpd3b65fzAJfh1lKJR7PfUnZSDmEoSSRllrxQlmRcdkye6d7ZWZrroZ2DkESsBuhUEO0imAORpuPzsm10nzfm4IOtJo9JwBnrMwQsKJXkDJjfDAALT7r5mkepfJI91H6SlXgqeLooVHNxbxbVUGH7NVue1T4s=; 5:K6j0w/wF3wJnwgY7/7X/t0gCOVW0wm9hOYVnJuXwfw2ZQaB+KEdU1KK0/SgizgSZTcdkf+iCiYwts7smAg3lzPMhXqu+HrDbsKxL1ILQx7Ozw7bQhhBlo/AywB1Kqj53GWw29Bcs/l8XxFTgb75+ag==; 24:XTedwOj7n+l7sOpAmNdWr4NmaZMHMM7muAICuTL7nizzh/e3jnyjlVvbrfmM2ZMywfUP/s67hLHhHDW5F425H6ZVoPzy8BXTF09IwhKLHjA=; 7:IpzKXBtXt7x8NlZD2L3QnLqeoJvjZqHNjmK+3zX48y0BSj4HTfTx9LZYXW6mqb4urKofFWinKZJ5LRwF4NuovoauZkxl6wXzQL7fx33Xa1DJuCsv8EC0UWg4Rz91m0y1Bdvq7I+ttgrxaNkW3jxU0w2IIIH0kfCu3a1EWh6YUauc5h2IlKISGyAgOAVubPru8XlwaO8zUmL1bSKrgxZgQFqml+ckoBI8zWpAYrj8SWTK7C/zFYgUChJSn1hC+6Egue175BYxywIRMv7rMOi9tF9sUt4RSMXLaHj+5Mi1+tiyKKh5eDm1OGpmKJCKyC6M x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900003); DIR:OUT; SFP:1102; SCL:1; SRVR:VE1EUR03HT020; H:AM4PR0701MB2162.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; x-ms-office365-filtering-correlation-id: 8f4cf06a-1d9f-4b4b-e838-08d3efb67013 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(1601124038)(1603103081)(1601125047); SRVR:VE1EUR03HT020; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015012)(82015046); SRVR:VE1EUR03HT020; BCL:0; PCL:0; RULEID:; SRVR:VE1EUR03HT020; x-forefront-prvs: 008960E8EC spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="Windows-1252" Content-ID: <2FEBBCF852149449B31FA9AE29CE0A2A@eurprd07.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Oct 2016 20:05:24.3129 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR03HT020 |
--- a/gcc/cp/cp-gimplify.c +++ b/gcc/cp/cp-gimplify.c @@ -2253,6 +2253,15 @@ cp_fold (tree x) op1 = cp_fold (TREE_OPERAND (x, 1)); op2 = cp_fold (TREE_OPERAND (x, 2)); + if (TREE_CODE (TREE_TYPE (x)) == BOOLEAN_TYPE) + { + warning_sentinel (warn_int_in_bool_context); Yes, it compiles, but ... how can this compile at all? Doesn't it miss a name of a local? like warning_sentinel c (warn_int_in_bool_context); If I disassemble this function I see a constructor of