Re: A few warnings on Windows
Thomas Munro <thomas.munro@enterprisedb.com>
From: Thomas Munro <thomas.munro@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>,
Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-05-02T01:26:17Z
Lists: pgsql-hackers
Attachments
- 0001-Change-SIZEOF_BOOL-to-1-for-Windows.patch (application/octet-stream) patch 0001
- 0002-Fix-compiler-warning-on-Windows.patch (application/octet-stream) patch 0002
On Wed, May 2, 2018 at 12:51 PM, Thomas Munro <thomas.munro@enterprisedb.com> wrote: > On Wed, May 2, 2018 at 11:39 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> We'll soon find out. > > Nope -- and I think that's because we only actually use stdbool.h > instead of our own macros if we think sizeof(bool) is exactly 1. But > we don't because pg_config.h.win32 says: > > #define SIZEOF_BOOL 0 > > Perhaps that's what Peter E meant when he said "Windows could use some > manual adjustments in pg_config.h.win32 if anyone > cares"[1]. Should we just change this to 1? I'm going to go and test > that now. From googling sizeof(bool) am aware that ancient VC (before > 5.0 more than 20 years ago) had a header that defined bool as int, but > that seems irrelevant now, right? That compiles and runs the main checks (except tablespace which I suppress) cleanly for me and I assume it really is using stdbool.h this time. Hopefully plperl will be happier this way. Since my earlier test, a new entirely independent warning arrived with commit 41c912ca: c:\projects\postgres\src\bin\pgbench\pgbench.c(2327): warning C4715: 'evalStandardFunc' : not all control paths return a value [C:\projects\postgres\pgbench.vcxproj] Patch for that attached, too. -- Thomas Munro http://www.enterprisedb.com
Commits
-
Suppress some compiler warnings in plperl on Windows.
- 0996e4be047f 11.0 landed
-
Fix compiler warning on Windows.
- fe4ecd08d81c 11.0 landed
-
Change SIZEOF_BOOL to 1 for Windows.
- 6fe25c1358a2 11.0 landed
-
Fix some assorted compiler warnings on Windows.
- b2328bf62b64 11.0 landed
-
Clean up warnings from -Wimplicit-fallthrough.
- 41c912cad159 11.0 landed