]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Drop support for _MSC_VER less than 1933
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 16 Jul 2026 09:47:41 +0000 (11:47 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 16 Jul 2026 10:03:05 +0000 (12:03 +0200)
Commit aa7c8685234 added a workaround for _MSC_VER less than 1933,
which is Visual Studio 2022 version 17.3.  Since we dropped support
for Visual Studio before 2022, and the versions up to 17.3 are long
EOL, we can drop this extra code.

Reviewed-by: Jelte Fennema-Nio <postgres@jeltef.nl>
Discussion: https://www.postgresql.org/message-id/flat/CA+hUKGL7trhWiJ4qxpksBztMMTWDyPnP1QN+Lq341V7QL775DA@mail.gmail.com

src/include/c.h

index 8d1aa4b639d81b64f350985ef2cc1df9cc229984..20cfbac54e71806014ea2dc02ba0bfa90f947997 100644 (file)
@@ -1081,24 +1081,10 @@ pg_noreturn extern void ExceptionalCondition(const char *conditionName,
  * rationale for the precise behavior of this implementation.  See
  * <https://stackoverflow.com/questions/31311748> about the C++
  * implementation.
- *
- * For compilers that don't support this, we fall back on a kluge that assumes
- * the compiler will complain about a negative width for a struct bit-field.
- * This will not include a helpful error message, but it beats not getting an
- * error at all.
  */
 #ifndef __cplusplus
-#if !defined(_MSC_VER) || _MSC_VER >= 1933
 #define StaticAssertExpr(condition, errmessage) \
        ((void) sizeof(struct {static_assert(condition, errmessage); char a;}))
-#else                                                  /* _MSC_VER < 1933 */
-/*
- * This compiler is buggy and fails to compile the previous variant; use a
- * fallback implementation.
- */
-#define StaticAssertExpr(condition, errmessage) \
-       ((void) sizeof(struct { int static_assert_failure : (condition) ? 1 : -1; }))
-#endif                                                 /* _MSC_VER < 1933 */
 #else                                                  /* __cplusplus */
 #define StaticAssertExpr(condition, errmessage) \
        ([]{static_assert(condition, errmessage);})