Re: [HACKERS] [PATCH] quiet conversion warning in DatumGetFloat4 - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: [HACKERS] [PATCH] quiet conversion warning in DatumGetFloat4
Date
Msg-id b3ee396d-7e86-3a57-50eb-def23267eea9@anastigmatix.net
Whole thread Raw
In response to Re: [HACKERS] [PATCH] quiet conversion warning in DatumGetFloat4  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] [PATCH] quiet conversion warning in DatumGetFloat4  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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. There are gobs
of those, which I looked into briefly last year, realized they'd
only be fixed by a bunch of cluttery unenlightening casts in pg
headers, which I did not propose, having a suspicion that's how
you would feel about them. I added a Maven build profile that
adds the -Wno-sign-conversion (though actually getting Maven to
select that profile automatically when the compiler is gcc is
one of those things you'd expect to be easy and then be surprised.)

But as long as there used to be no extraneous noise outside of
/sign/ conversions, I figured this one new appearance of a warning
outside that category would be worth silencing, before some day
comes when there are three and it seems like an organization,
or fifty and it seems like a movement.

-Chap



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] [PATCH] relocation truncated to fit: citus buildfailure on s390x
Next
From: Michael Paquier
Date:
Subject: Re: [HACKERS] Re: [GENERAL] pg_basebackup error: replication slot"pg_basebackup_2194" already exists