From: David Rowley <david.rowley@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Suppress compiler warnings in ecpg test on newer Windows toolcha
Date: Wed, 8 Mar 2017 15:47:26 +1300
Message-ID: <CAKJS1f-BHceaFzZScFapDV48gUVM2CAOBfhkgffdqXzFb+kwew@mail.gmail.com> (raw)
In-Reply-To: <E1chNgI-0005vB-O1@gemulon.postgresql.org>
References: <E1chNgI-0005vB-O1@gemulon.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
On 25 February 2017 at 10:45, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Suppress compiler warnings in ecpg test on newer Windows toolchains.
>
> nan_test.pgc supposed that it could unconditionally #define isnan()
> and isinf() on WIN32. This was evidently copied at some point from
> src/include/port/win32.h, but nowadays there's a test on _MSC_VER
> there. Make nan_test.pgc look the same.
>
> Per buildfarm warnings. There's no evidence this produces anything
> worse than a warning, and besides it's only a test case, so I don't
> feel a need to back-patch.
>
> Branch
> ------
> master
>
> Details
> -------
> http://git.postgresql.org/pg/commitdiff/c5658a0764d5ac5ea8c2c11d27c62d5472234227
>
> Modified Files
> --------------
> .../ecpg/test/expected/pgtypeslib-nan_test.c | 102 +++---
> .../ecpg/test/expected/pgtypeslib-nan_test.stderr | 354 ++++++++++-----------
> src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc | 2 +
> 3 files changed, 231 insertions(+), 227 deletions(-)
This seems to have caused some new compiler warnings [1] on earlier
MSVC toolchains.
The reason seems to be that these older versions require float.h to be
included for _isnan() [2]
So anyway, we seem to be including float.h in all the other places
we're using isnan(), so the attached adds float.h to the files where
we're getting the warnings too.
[1] https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=thrips&dt=2017-03-07%2022%3A37%3A2...
[2] https://msdn.microsoft.com/en-us/library/tzthab44(v=vs.110).aspx
--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committersAttachments:isnan_msvc_warning_fixes.patch (application/octet-stream, 1.3K) downloaddiff --git a/src/backend/access/gist/gistproc.c b/src/backend/access/gist/gistproc.cindex ffb1d77..15b89fd 100644--- a/src/backend/access/gist/gistproc.c+++ b/src/backend/access/gist/gistproc.c@@ -17,6 +17,7 @@
*/
#include "postgres.h"
+#include <float.h>
#include <math.h>
#include "access/gist.h"
diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.cindex 75845ba..cbdaec9 100644--- a/src/backend/access/gist/gistutil.c+++ b/src/backend/access/gist/gistutil.c@@ -13,6 +13,7 @@
*/
#include "postgres.h"
+#include <float.h>
#include <math.h>
#include "access/gist_private.h"
diff --git a/src/backend/utils/adt/orderedsetaggs.c b/src/backend/utils/adt/orderedsetaggs.cindex f9f18f2..e462fbd 100644--- a/src/backend/utils/adt/orderedsetaggs.c+++ b/src/backend/utils/adt/orderedsetaggs.c@@ -14,6 +14,7 @@
*/
#include "postgres.h"
+#include <float.h>
#include <math.h>
#include "catalog/pg_aggregate.h"
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.cindex 8b05e8f..a04fd7b 100644--- a/src/backend/utils/adt/selfuncs.c+++ b/src/backend/utils/adt/selfuncs.c@@ -98,6 +98,7 @@
#include "postgres.h"
#include <ctype.h>
+#include <float.h>
#include <math.h>
#include "access/gin.h"
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: david.rowley@2ndquadrant.com, tgl@sss.pgh.pa.us
Subject: Re: pgsql: Suppress compiler warnings in ecpg test on newer Windows toolcha
In-Reply-To: <CAKJS1f-BHceaFzZScFapDV48gUVM2CAOBfhkgffdqXzFb+kwew@mail.gmail.com>
References: <E1chNgI-0005vB-O1@gemulon.postgresql.org> <CAKJS1f-BHceaFzZScFapDV48gUVM2CAOBfhkgffdqXzFb+kwew@mail.gmail.com>
* 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