Re: MSVC: Improve warning options set
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: pgsql-hackers@lists.postgresql.org, Thomas Munro <thomas.munro@gmail.com>,
Peter Eisentraut <peter@eisentraut.org>
Cc: Bryan Green <dbryan.green@gmail.com>
Date: 2025-11-09T03:21:20Z
Lists: pgsql-hackers
Hi, On November 8, 2025 4:40:26 PM EST, Thomas Munro <thomas.munro@gmail.com> wrote: >On Tue, Nov 4, 2025 at 7:56 AM Peter Eisentraut <peter@eisentraut.org> 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 "#if defined(MINGW32) >> > && !defined(_UCRT)" to distinguish them, if it matters. >> >> As of commit 1758d424461 (PG18) we require UCRT if using MinGW. >> >> 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.) > >The main CI task and build farm animal fairywren use UCRT, so there is >no automated test coverage for the old runtime and hasn't been for >some time, and that's also the default with that toolchain these day. >There is still one place that builds (without running) against MSVCRT >in CI: the CompilerWarnings mingw cross-compilation task that runs on >Debian. Pretty sure it's now using ucrt too, that had to be changed as part of the update to Trixie, otherwise the builds would fail. Andres -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Commits
-
Fix "inconsistent DLL linkage" warning on Windows MSVC
- a3ea5330fcf4 19 (unreleased) landed
-
MSVC: Improve warning options set
- 2307cfe31621 19 (unreleased) landed
-
Enable MSVC conforming preprocessor
- 8fd9bb1d9654 19 (unreleased) cited
-
Fix warnings about declaration of environ on MinGW.
- 7bc9a8bdd2d6 18.0 cited
-
Require ucrt if using MinGW.
- 1758d4244616 18.0 cited