Enable MSVC conforming preprocessor
authorPeter Eisentraut
Tue, 1 Jul 2025 07:36:33 +0000 (09:36 +0200)
committerPeter Eisentraut
Tue, 1 Jul 2025 07:41:40 +0000 (09:41 +0200)
Switch MSVC to use the conforming preprocessor, using the
/Zc:preprocessor option.

This allows us to drop the alternative implementation of
VA_ARGS_NARGS() for the previous "traditional" preprocessor.

This also prepares the way for enabling C11 mode in the future, which
enables the conforming preprocessor by default.

This now requires Visual Studio 2019.  The installation documentation
is adjusted accordingly.

Discussion: https://www.postgresql.org/message-id/flat/01a69441-af54-4822-891b-ca28e05b215a%40eisentraut.org

doc/src/sgml/installation.sgml
meson.build
src/include/c.h

index de19f3ad92952df0b552ec5b88b38e7fbd299a91..cb53530cc4fa819a0ac8ab643a6f97ba21b6a00a 100644 (file)
@@ -3847,17 +3847,13 @@ make: *** [postgres] Error 1
    
     Both 32-bit and 64-bit builds are possible with the Microsoft Compiler suite.
     32-bit PostgreSQL builds are possible with
-    Visual Studio 2015 to
+    Visual Studio 2019 to
     Visual Studio 2022,
     as well as standalone Windows SDK releases 10 and above.
     64-bit PostgreSQL builds are supported with
     Microsoft Windows SDK version 10 and above or
-    Visual Studio 2015 and above.
+    Visual Studio 2019 and above.