From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chapman Flack <chap@anastigmatix.net>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH] quiet conversion warning in DatumGetFloat4
Date: Thu, 01 Jun 2017 17:41:25 -0400
Message-ID: <19039.1496353285@sss.pgh.pa.us> (raw)
In-Reply-To: <b3ee396d-7e86-3a57-50eb-def23267eea9@anastigmatix.net>
References: <592E4D04.1070609@anastigmatix.net>
<5894.1496208390@sss.pgh.pa.us>
<592E5ABF.8070706@anastigmatix.net>
<22297.1496244978@sss.pgh.pa.us>
<b3ee396d-7e86-3a57-50eb-def23267eea9@anastigmatix.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Chapman Flack <chap@anastigmatix.net> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, chap@anastigmatix.net
Subject: Re: [PATCH] quiet conversion warning in DatumGetFloat4
In-Reply-To: <19039.1496353285@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox