Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQbQ3-0001fv-DE for pgsql-committers@arkaria.postgresql.org; Sun, 17 Dec 2017 16:04:03 +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 1eQbQ2-00081m-CU for pgsql-committers@arkaria.postgresql.org; Sun, 17 Dec 2017 16:04:02 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eQbQ2-00081V-4w for pgsql-committers@lists.postgresql.org; Sun, 17 Dec 2017 16:04:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eQbPu-0005BV-UI for pgsql-committers@postgresql.org; Sun, 17 Dec 2017 16:04:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id vBHG3nWL003358; Sun, 17 Dec 2017 11:03:49 -0500 From: Tom Lane To: Michael Paquier cc: Andres Freund , pgsql-committers@postgresql.org Subject: Re: pgsql: Provide overflow safe integer math inline functions. In-reply-to: References: <20171213213754.pydkyjs6bt2hvsdb@alap3.anarazel.de> <20171217003207.3myeahkbsm63kbvl@alap3.anarazel.de> Comments: In-reply-to Michael Paquier message dated "Sun, 17 Dec 2017 16:00:31 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3356.1513526629.1@sss.pgh.pa.us> Date: Sun, 17 Dec 2017 11:03:49 -0500 Message-ID: <3357.1513526629@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. regards, tom lane