Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGXrA-0006vG-Oe for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Jun 2017 21:42:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dGXrA-00071q-3Q for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Jun 2017 21:42:12 +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 1dGXr9-00071g-JQ for pgsql-hackers@postgresql.org; Thu, 01 Jun 2017 21:42:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dGXr5-0004z0-VE for pgsql-hackers@postgresql.org; Thu, 01 Jun 2017 21:42:11 +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 v51LfPST019040; Thu, 1 Jun 2017 17:41:25 -0400 From: Tom Lane To: Chapman Flack cc: PostgreSQL Hackers Subject: Re: [PATCH] quiet conversion warning in DatumGetFloat4 In-reply-to: References: <592E4D04.1070609@anastigmatix.net> <5894.1496208390@sss.pgh.pa.us> <592E5ABF.8070706@anastigmatix.net> <22297.1496244978@sss.pgh.pa.us> Comments: In-reply-to Chapman Flack message dated "Wed, 31 May 2017 13:51:20 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19038.1496353285.1@sss.pgh.pa.us> Date: Thu, 01 Jun 2017 17:41:25 -0400 Message-ID: <19039.1496353285@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Chapman Flack writes: > On 05/31/2017 11:36 AM, Tom Lane wrote: >> However, I grant your point that some extensions may have outside >> constraints that mandate using -Wconversion, so to the extent that >> we can keep key headers like postgres.h from triggering those warnings, >> it's probably worth doing. I suspect you're still seeing a lot of them >> though --- experiments with some contrib modules suggest that a lot of >> our other headers also contain code that would trigger them. I do not >> think I'd be on board with trying to silence them generally. > That was actually the only one PL/Java gets, outside of /sign/ > conversions, a special subset of conversion warnings that can be > separately turned off with -Wno-sign-conversion. Just for the archives' sake: I experimented with this, using Fedora 25's compiler (gcc version 6.3.1) against current HEAD (including your patch). For the core build only, no contrib, I see: 12169 warnings generated by -Wconversion 4106 warnings generated by -Wconversion -Wno-sign-conversion It's not just the core code that has issues either: contrib has 2202 warnings for the first case, 683 for the second. So it's better with -Wno-sign-conversion, but I'd say we're still not going there anytime soon. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers