From: Peter Eisentraut Date: Tue, 31 Mar 2026 06:38:24 +0000 (+0200) Subject: Disable some C++ warnings in MSVC X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82a7cbea747c465eee8449587be2d6cc47af82fe;p=thirdparty%2Fpostgresql.git Disable some C++ warnings in MSVC Flexible array members, as used in many PostgreSQL header files, are not a C++ feature. MSVC warns about these. Disable the warning. (GCC and Clang accept them, but they would warn in -pedantic mode.) Reviewed-by: Jelte Fennema-Nio Discussion: https://www.postgresql.org/message-id/flat/CAGECzQR21OnnKiZO_1rLWO0-16kg1JBxnVq-wymYW0-_1cUNtg%40mail.gmail.com --- diff --git a/meson.build b/meson.build index cfd9cc2890d..c4b4cd4af06 100644 --- a/meson.build +++ b/meson.build @@ -2325,6 +2325,9 @@ if cc.get_id() == 'msvc' ] msvc_cxx_warning_flags = [ + # Warnings to disable: + # from /W2: + '/wd4200', # nonstandard extension used: zero-sized array in struct/union [widely used in PostgreSQL C headers] ] cflags_warn += msvc_common_warning_flags