From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115324 invoked by alias); 20 Oct 2016 14:00:22 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 115293 invoked by uid 89); 20 Oct 2016 14:00:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=anticipation, H*MI:sk:2016102 X-HELO: BAY004-OMC1S12.hotmail.com Received: from bay004-omc1s12.hotmail.com (HELO BAY004-OMC1S12.hotmail.com) (65.54.190.23) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 20 Oct 2016 14:00:09 +0000 Received: from EUR03-DB5-obe.outbound.protection.outlook.com ([65.54.190.60]) by BAY004-OMC1S12.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Thu, 20 Oct 2016 07:00:05 -0700 Received: from DB5EUR03FT055.eop-EUR03.prod.protection.outlook.com (10.152.20.53) by DB5EUR03HT222.eop-EUR03.prod.protection.outlook.com (10.152.21.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.7; Thu, 20 Oct 2016 14:00:01 +0000 Received: from HE1PR0701MB2169.eurprd07.prod.outlook.com (10.152.20.60) by DB5EUR03FT055.mail.protection.outlook.com (10.152.21.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.7 via Frontend Transport; Thu, 20 Oct 2016 14:00:01 +0000 Received: from HE1PR0701MB2169.eurprd07.prod.outlook.com ([10.168.36.18]) by HE1PR0701MB2169.eurprd07.prod.outlook.com ([10.168.36.18]) with mapi id 15.01.0679.006; Thu, 20 Oct 2016 14:00:01 +0000 From: Bernd Edlinger To: Markus Trippelsdorf , Jeff Law CC: Joseph Myers , Jason Merrill , Florian Weimer , "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH] Make -Wint-in-bool-context warn on suspicious shift ops Date: Thu, 20 Oct 2016 14:00:00 -0000 Message-ID: References: <20161017152304.GA303@x4> <20161017171124.GB303@x4> <00b1bafc-7730-560b-d858-8e4d8660641d@redhat.com> <20161020080535.GA6526@x4> In-Reply-To: <20161020080535.GA6526@x4> authentication-results: trippelsdorf.de; dkim=none (message not signed) header.d=none;trippelsdorf.de; dmarc=none action=none header.from=hotmail.de; x-ms-exchange-messagesentrepresentingtype: 1 x-eopattributedmessage: 0 x-microsoft-exchange-diagnostics: 1;DB5EUR03HT222;6:PDKWx5csBm5tmtS5WPNwl6zCOdUPeCyTTH4vtCBffYXbac7gS8WqQFzYMv1ZqZzSE7PezxSEFN8s1ctGCmJxNXjYZJSFEZc0FcInvjLeCRq92XtFctx7PDvluujmYImfo6dzHdDbtoqVIdwx87v7A2+WlPIh71LLKPbHQRCxwcIndFiTpAM9Gge5o0u7e9MRB/XlhaqGmmNJ8MpVyzY+r5TEhm9KszvSOsdBKZjniNZ2yAoIQvBrDkdPf6odVu1MnPZBVqYJvIATf13y0cYT0VGKnu6PjUoM+HKc0zu2icJeqAd7wkLnCQM37crnj4ZV;5:eG3sktCEgjYxDCCpN8aBB9yIow7l1yyLQLz0+pAMVgAsTsEAG1JrUTsFvJXv2G32dY7zYM6pt5BIDY2u4Oo0S9wumjOpm0P6Ne2+irRExtBpyD823hkXAhrpkOhxsg3fjXw+NZgyq1vtChM7fJN0yg==;24:DFV1mzMbYoN5lP41iK6O5XXwlArdWGJm3rUA6K+8eOeFvlUPOSVGfOR/HxDFYRO3bB6oxcDMH9IYO6QMfw90Z3tOC5w8knHBI0ZRHubf1GE=;7:YTxHYxEEj4JlUHFFAds6WptfCzR2Si8jr0+Eyzls7xRHaHU9z6tIRbcXASrpk5OkxPrFODGSpPP0ApbCNUIYqDadb362bJr12rO6pjbnnNqYyiV49nt+pnV8KyQzOTMMhSnCWFkhJYZ/zorDJQJtXmwuIPg6u3xTOao11F6NKyTlzAEknhhHb0+zI0+ubRwvF3bnHT4SWx71LaG5h/HaX50uYD66zOrEecdDzh6sQU1Y3bIGjORDCRtCfC53nhwEqDaavSYZFMTX/xkYmd0Bm69xs0sT9+w9qb8Z2pw2hlX/rkNZQywPWQWMPNtmieEqLnKGsCBsTVFgoHZTKGIxuSKeomhncXNJ8+8vxar6xoI= x-forefront-antispam-report: EFV:NLI;SFV:NSPM;SFS:(10019020)(98900003);DIR:OUT;SFP:1102;SCL:1;SRVR:DB5EUR03HT222;H:HE1PR0701MB2169.eurprd07.prod.outlook.com;FPR:;SPF:None;LANG:en; x-ms-office365-filtering-correlation-id: 1ffc1d3a-911b-4707-73f7-08d3f8f16132 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(1601124038)(1603103081)(1601125047);SRVR:DB5EUR03HT222; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(432015012)(82015046);SRVR:DB5EUR03HT222;BCL:0;PCL:0;RULEID:;SRVR:DB5EUR03HT222; x-forefront-prvs: 01018CB5B3 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="Windows-1252" Content-ID: <7438F27F6C7D12478C5DEA3E0FC42E17@eurprd07.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Oct 2016 14:00:01.2583 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5EUR03HT222 X-SW-Source: 2016-10/txt/msg01644.txt.bz2 On 10/20/16 10:05, Markus Trippelsdorf wrote: > > Thanks for the commit. But I think the comment is wrong: > > + /* We will only warn on unsigned shifts here, because the majority= of > ^^ > This should be =BBsigned=AB. > Oops. Thanks for noticing. This is what I am going to check in as obvious: --- ChangeLog (revision 241376) +++ ChangeLog (working copy) @@ -1,3 +1,7 @@ +2016-10-20 Bernd Edlinger + + * c-common.c (c_common_truthvalue_conversion): Fix the comment. + 2016-10-20 Jason Merrill * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value. Index: c-common.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- c-common.c (revision 241376) +++ c-common.c (working copy) @@ -3328,7 +3328,7 @@ TREE_OPERAND (expr, 0)); case LSHIFT_EXPR: - /* We will only warn on unsigned shifts here, because the majority of + /* We will only warn on signed shifts here, because the majority of false positive warnings happen in code where unsigned arithmetic was used in anticipation of a possible overflow. Furthermore, if we see an unsigned type here we know that the result of the shift is not subject to integer promotion rules. */ Bernd