Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQySd-0007aP-Ap for pgsql-committers@arkaria.postgresql.org; Mon, 18 Dec 2017 16:40:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQySc-00063i-8D for pgsql-committers@arkaria.postgresql.org; Mon, 18 Dec 2017 16:40:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eQySb-00063W-T5 for pgsql-committers@lists.postgresql.org; Mon, 18 Dec 2017 16:40:14 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eQySZ-0003iD-9Z for pgsql-committers@postgresql.org; Mon, 18 Dec 2017 16:40:13 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 72A7520EA7; Mon, 18 Dec 2017 11:40:08 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Mon, 18 Dec 2017 11:40:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=G5mIyBnt2L3iOGSb7gvmqyLSGHkA8 CYlyz1k+5OV1Qc=; b=rN6Kog5IzH5SWQtP/yYOi73THbsM3Eqx4Qn9cVCXANOZe DuNyVvAV15Sp/Jp3/Xlux41hfoJBd1jjM+EVT3zxAVW6+F3BmRVXDVP9J3BTFKuf twagZixUM92+Vlh+Y3aSmJ8+G8kREgWX3JZSHHGA2zt28FG+E/EGE+YcRodqRse1 uSei/2SNAZnFr1zHugrjqxEBex7UbihFpVl/fA62AEX0xTnEJk9CFFLZ+wlKAmLD kJ64Vx2NYKtZ1z6S+JbRHjrhOFQ4F2iRdB6U0YsKrktJ0a0u2RU3eqdDf5om/h9X 4cle2/406TqoZ7p9C8SE1cwsHTJ2lSg31WULJfolg== X-ME-Sender: Received: from intern.anarazel.de (unknown [136.24.76.189]) by mail.messagingengine.com (Postfix) with ESMTPA id 07D3524250; Mon, 18 Dec 2017 11:40:08 -0500 (EST) Date: Mon, 18 Dec 2017 08:40:06 -0800 From: Andres Freund To: Tom Lane Cc: Michael Paquier , pgsql-committers@postgresql.org Subject: Re: pgsql: Provide overflow safe integer math inline functions. Message-ID: <20171218164006.hmyijjs2dgqfkhuh@alap3.anarazel.de> References: <20171213213754.pydkyjs6bt2hvsdb@alap3.anarazel.de> <20171217003207.3myeahkbsm63kbvl@alap3.anarazel.de> <3357.1513526629@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3357.1513526629@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2017-12-17 11:03:49 -0500, Tom Lane wrote: > Michael Paquier writes: > > ... Please note that if you added > > a volatile cast to "result" as well, then compilation was able to > > complete and regression tests passed... > > Yeah, that squares with my analysis: the problem with the existing test > is that the compiler is throwing away the function call because its > output is unused. > > If I haven't seen something from Andres shortly, I'll push a fix. Thanks! Was off for most of yesterday... Greetings, Andres Freund