public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: some extra warnings from MSVC
Date: Sat, 11 Apr 2026 10:09:58 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
Peter Eisentraut <[email protected]> writes:
> The first one is from commit 65707ed9afc (Add backtrace support for
> Windows). This would be an error in gcc (from C99 on); it's kind of
> incredible that MSVC doesn't even warn about this by default. I propose
> to add this warning category to the default set.
> (Second thought: For consistency, make this an error, with '/we4013'
> instead of '/w24013'.)
+1 for making it an error.
> The second one is from commit 13b935cd521 (Change dynahash.c and
> hsearch.h to use int64 instead of long). I don't have a patch here to
> include this in the default warning set, mainly because it doesn't
> appear to map to any gcc warning option, but maybe we should add it
> anyway, since it can catch this kind of 4-byte-long-on-Windows issue.
I think it'd be a good idea to warn even if we can't make gcc do that.
I think Windows is the only 64-bit platform we deal with where long
is just 32 bits, so covering the case in MSVC will expose bugs we
would not notice otherwise.
regards, tom lane
view thread (3+ messages) latest in thread
reply
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: some extra warnings from MSVC
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox