[libcxx-commits] [libcxx] 4dfe014 - [libc++] Add -Wno-sized-deallocation to avoid spurious GCC warnings

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 30 09:51:23 PDT 2020


Author: Louis Dionne
Date: 2020-10-30T12:51:07-04:00
New Revision: 4dfe014a12919580d122a6c1f02d653c6b0966d5

URL: https://github.com/llvm/llvm-project/commit/4dfe014a12919580d122a6c1f02d653c6b0966d5
DIFF: https://github.com/llvm/llvm-project/commit/4dfe014a12919580d122a6c1f02d653c6b0966d5.diff

LOG: [libc++] Add -Wno-sized-deallocation to avoid spurious GCC warnings

GCC tries to be nice and tell us that we probably want to also implement
sized deallocation functions when we override the normal ones. However,
we know what we're doing in the test suite and don't want to override
them.

Added: 
    

Modified: 
    libcxx/utils/libcxx/test/config.py

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index cb94e3c26f4c..a84ef4a1a22d 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -526,6 +526,11 @@ def configure_warnings(self):
         self.cxx.addWarningFlagIfSupported('-Wno-noexcept-type')
         self.cxx.addWarningFlagIfSupported('-Wno-aligned-allocation-unavailable')
         self.cxx.addWarningFlagIfSupported('-Wno-atomic-alignment')
+
+        # GCC warns about places where we might want to add sized allocation/deallocation
+        # functions, but we know better what we're doing/testing in the test suite.
+        self.cxx.addWarningFlagIfSupported('-Wno-sized-deallocation')
+
         # These warnings should be enabled in order to support the MSVC
         # team using the test suite; They enable the warnings below and
         # expect the test suite to be clean.


        


More information about the libcxx-commits mailing list