[llvm] 044ff0f - Re-enable MSVC C4204 diagnostic; NFC (#182491)

via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 20 06:14:59 PST 2026


Author: Aaron Ballman
Date: 2026-02-20T09:14:54-05:00
New Revision: 044ff0fe2d3549459476024a446231fc9230166e

URL: https://github.com/llvm/llvm-project/commit/044ff0fe2d3549459476024a446231fc9230166e
DIFF: https://github.com/llvm/llvm-project/commit/044ff0fe2d3549459476024a446231fc9230166e.diff

LOG: Re-enable MSVC C4204 diagnostic; NFC (#182491)

>From MSDN:

https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4204?view=msvc-170

> nonstandard extension used : non-constant aggregate initializer

This is an ANSI compatibility diagnostic which isn't useful for us to
disable. In my local testing, this diagnostic is not emitted.

Added: 
    

Modified: 
    llvm/cmake/modules/HandleLLVMOptions.cmake

Removed: 
    


################################################################################
diff  --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index c9c720d84ed62..122d3aab26e11 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -752,7 +752,6 @@ if (MSVC)
       -wd4703 # Suppress 'potentially uninitialized local pointer variable'
       -wd4389 # Suppress 'signed/unsigned mismatch'
       -wd4805 # Suppress 'unsafe mix of type <type> and type <type> in operation'
-      -wd4204 # Suppress 'nonstandard extension used : non-constant aggregate initializer'
       -wd4577 # Suppress 'noexcept used with no exception handling mode specified; termination on exception is not guaranteed'
       -wd4091 # Suppress 'typedef: ignored on left of '' when no variable is declared'
           # C4592 is disabled because of false positives in Visual Studio 2015


        


More information about the llvm-commits mailing list