Re: MSVC: Improve warning options set

2025-11-10 Thread Peter Eisentraut
On 08.11.25 22:40, Thomas Munro wrote: Unfortunately it didn't ever seem to become unbuildable, but apparently things break in undiagnosed ways at runtime (at a guess it might have some API calls that are stubbed out with empty implementations or something like that, but there is zero reason to i

Re: MSVC: Improve warning options set

2025-11-08 Thread Andres Freund
Hi, On November 8, 2025 4:40:26 PM EST, Thomas Munro wrote: >On Tue, Nov 4, 2025 at 7:56 AM Peter Eisentraut wrote: >> On 31.10.25 14:31, Bryan Green wrote: >> > The real question is MinGW. If we still support MinGW builds targeting >> > the old MSVCRT, those need the environ declaration. If we

Re: MSVC: Improve warning options set

2025-11-08 Thread Thomas Munro
On Sun, Nov 9, 2025 at 10:58 AM Tom Lane wrote: > I don't quite understand how 1758d4244 didn't break building with > MSVCRT? But if it builds yet doesn't in fact work, that's likely to > draw complaints from people who didn't spot the documentation change. I think it links against MinGW shims t

Re: MSVC: Improve warning options set

2025-11-08 Thread Tom Lane
Thomas Munro writes: > What we should do to make this clearer and avoid spurious problem > reports is error out unless you're on UCRT, but a patch for that got > stuck waiting for the Debian images used on CI to be upgraded to > Debian trixie, because that shipped the necessary newer > MinGW/heade

Re: MSVC: Improve warning options set

2025-11-08 Thread Thomas Munro
On Tue, Nov 4, 2025 at 7:56 AM Peter Eisentraut wrote: > On 31.10.25 14:31, Bryan Green wrote: > > The real question is MinGW. If we still support MinGW builds targeting > > the old MSVCRT, those need the environ declaration. If we require MinGW > > with UCRT, we don't. You'd need something like "

Re: MSVC: Improve warning options set

2025-11-08 Thread Peter Eisentraut
On 03.11.25 20:26, Andres Freund wrote: On 2025-11-03 19:56:16 +0100, Peter Eisentraut wrote: I don't know if we still support MSVCRT if using MSVC, or how long we still need to support it. (Or, for example, how to tell which variant CI or the buildfarm uses.) To my knowledge anything close t

Re: MSVC: Improve warning options set

2025-11-03 Thread Andres Freund
Hi, On 2025-11-03 19:56:16 +0100, Peter Eisentraut wrote: > I don't know if we still support MSVCRT if using MSVC, or how long we still > need to support it. (Or, for example, how to tell which variant CI or the > buildfarm uses.) To my knowledge anything close to a recent version visual studio

Re: MSVC: Improve warning options set

2025-11-03 Thread Andres Freund
Hi, On 2025-10-29 08:51:00 +0100, Peter Eisentraut wrote: > meson.build has a list of warnings to disable on MSVC: > > cflags_warn += [ > '/wd4018', # signed/unsigned mismatch > '/wd4244', # conversion from 'type1' to 'type2', possible loss of data > '/wd4273', # inconsistent DLL li

Re: MSVC: Improve warning options set

2025-11-03 Thread Peter Eisentraut
On 31.10.25 14:31, Bryan Green wrote: Regarding the environ declaration-- it comes down to which C runtime is being targeted. The old MSVCRT (msvcrt.dll) actually exported environ as a data symbol, so declaring "extern char **environ;" worked fine. MinGW traditionally targeted this runtime, a

Re: MSVC: Improve warning options set

2025-10-31 Thread Bryan Green
On 10/29/2025 1:51 AM, Peter Eisentraut wrote: meson.build has a list of warnings to disable on MSVC:   cflags_warn += [     '/wd4018', # signed/unsigned mismatch     '/wd4244', # conversion from 'type1' to 'type2', possible loss of data     '/wd4273', # inconsistent DLL linkage     '/wd410

MSVC: Improve warning options set

2025-10-29 Thread Peter Eisentraut
ws, so maybe we should move some things around to avoid the problem in this file. But there are also a few other files where environ is declared for use by Windows as well. From bb67ddee244d74e77b3de9d1418e44d4152adbef Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 28 Oct 2025 22:11