[llvm-branch-commits] [libcxxabi] 8334bca - [libc++abi] Fix gcc warnings: -Wpragmas.

Marek Kurdej via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Nov 25 06:30:14 PST 2020


Author: Marek Kurdej
Date: 2020-11-25T14:59:17+01:00
New Revision: 8334bcac61c8b63a1f8e047cc7b56ab087548816

URL: https://github.com/llvm/llvm-project/commit/8334bcac61c8b63a1f8e047cc7b56ab087548816
DIFF: https://github.com/llvm/llvm-project/commit/8334bcac61c8b63a1f8e047cc7b56ab087548816.diff

LOG: [libc++abi] Fix gcc warnings: -Wpragmas.

Added: 
    

Modified: 
    libcxxabi/test/dynamic_cast.pass.cpp
    libcxxabi/test/dynamic_cast3.pass.cpp
    libcxxabi/test/dynamic_cast5.pass.cpp
    libcxxabi/test/unwind_06.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxxabi/test/dynamic_cast.pass.cpp b/libcxxabi/test/dynamic_cast.pass.cpp
index 49ecddb4177b..69f5dc3aa8b6 100644
--- a/libcxxabi/test/dynamic_cast.pass.cpp
+++ b/libcxxabi/test/dynamic_cast.pass.cpp
@@ -12,7 +12,7 @@
 // bases.
 #if defined(__clang__)
 #   pragma clang diagnostic ignored "-Winaccessible-base"
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) && (__GNUC__ >= 10)
 #   pragma GCC diagnostic ignored "-Winaccessible-base"
 #endif
 

diff  --git a/libcxxabi/test/dynamic_cast3.pass.cpp b/libcxxabi/test/dynamic_cast3.pass.cpp
index 9c25cac865b9..2eefafa2b42b 100644
--- a/libcxxabi/test/dynamic_cast3.pass.cpp
+++ b/libcxxabi/test/dynamic_cast3.pass.cpp
@@ -13,7 +13,7 @@
 // bases.
 #if defined(__clang__)
 #   pragma clang diagnostic ignored "-Winaccessible-base"
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) && (__GNUC__ >= 10)
 #   pragma GCC diagnostic ignored "-Winaccessible-base"
 #endif
 

diff  --git a/libcxxabi/test/dynamic_cast5.pass.cpp b/libcxxabi/test/dynamic_cast5.pass.cpp
index 0a9689c23d6b..7fdf106aae5b 100644
--- a/libcxxabi/test/dynamic_cast5.pass.cpp
+++ b/libcxxabi/test/dynamic_cast5.pass.cpp
@@ -13,7 +13,7 @@
 // bases.
 #if defined(__clang__)
 #   pragma clang diagnostic ignored "-Winaccessible-base"
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) && (__GNUC__ >= 10)
 #   pragma GCC diagnostic ignored "-Winaccessible-base"
 #endif
 

diff  --git a/libcxxabi/test/unwind_06.pass.cpp b/libcxxabi/test/unwind_06.pass.cpp
index 0c34c4949376..f8e9f8953aa9 100644
--- a/libcxxabi/test/unwind_06.pass.cpp
+++ b/libcxxabi/test/unwind_06.pass.cpp
@@ -14,7 +14,7 @@
 #include <stdio.h>
 
 // Suppress diagnostics about deprecated volatile operations
-#if defined(__GNUC__) && !defined(__clang__)
+#if defined(__GNUC__) && (__GNUC__ >= 10) && !defined(__clang__)
 # pragma GCC diagnostic ignored "-Wvolatile"
 #endif
 


        


More information about the llvm-branch-commits mailing list