pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Suppress compiler warnings in ecpg test on newer Windows toolcha 3+ messages / 2 participants [nested] [flat]
Commits from this thread: 2017-03-08 86dbbf20d8 Put back <float.h> in a few files that need it for _isnan().
* pgsql: Suppress compiler warnings in ecpg test on newer Windows toolcha @ 2017-02-24 21:45 Tom Lane <tgl@sss.pgh.pa.us> 2017-03-08 02:47 ` Re: pgsql: Suppress compiler warnings in ecpg test on newer Windows toolcha David Rowley <david.rowley@2ndquadrant.com> 0 siblings, 1 reply; 3+ messages in thread From: Tom Lane @ 2017-02-24 21:45 UTC (permalink / raw) To: pgsql-committers 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(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Suppress compiler warnings in ecpg test on newer Windows toolcha 2017-02-24 21:45 pgsql: Suppress compiler warnings in ecpg test on newer Windows toolcha Tom Lane <tgl@sss.pgh.pa.us> @ 2017-03-08 02:47 ` David Rowley <david.rowley@2ndquadrant.com> 2017-03-08 20:41 ` Re: pgsql: Suppress compiler warnings in ecpg test on newer Windows toolcha Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 3+ messages in thread From: David Rowley @ 2017-03-08 02:47 UTC (permalink / raw) To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-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-committers Attachments:^ permalink raw reply [nested|flat] 3+ messages in threadisnan_msvc_warning_fixes.patch (application/octet-stream, 1.3K) download
diff --git a/src/backend/access/gist/gistproc.c b/src/backend/access/gist/gistproc.c index 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.c index 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.c index 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.c index 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"
* Re: pgsql: Suppress compiler warnings in ecpg test on newer Windows toolcha 2017-02-24 21:45 pgsql: Suppress compiler warnings in ecpg test on newer Windows toolcha Tom Lane <tgl@sss.pgh.pa.us> 2017-03-08 02:47 ` Re: pgsql: Suppress compiler warnings in ecpg test on newer Windows toolcha David Rowley <david.rowley@2ndquadrant.com> @ 2017-03-08 20:41 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2017-03-08 20:41 UTC (permalink / raw) To: David Rowley <david.rowley@2ndquadrant.com>; +Cc: pgsql-committers David Rowley <david.rowley@2ndquadrant.com> writes: > 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. > This seems to have caused some new compiler warnings [1] on earlier > MSVC toolchains. That didn't make any sense to me, because the commit you mention only touched one ecpg test file. But closer inspection of thrips' buildfarm history says that the warnings appeared with commit c29aff959, which does make sense, because that removed <float.h> from a header file that these .c files must have been getting it from. Fix pushed, thanks for noticing. regards, tom lane -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2017-03-08 20:41 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2017-02-24 21:45 pgsql: Suppress compiler warnings in ecpg test on newer Windows toolcha Tom Lane <tgl@sss.pgh.pa.us> 2017-03-08 02:47 ` David Rowley <david.rowley@2ndquadrant.com> 2017-03-08 20:41 ` Tom Lane <tgl@sss.pgh.pa.us>
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