summaryrefslogtreecommitdiff
path: root/unittests/Support/AlignOfTest.cpp
diff options
context:
space:
mode:
authorJoe Abbey <jabbey@arxan.com>2012-11-17 04:54:22 +0000
committerJoe Abbey <jabbey@arxan.com>2012-11-17 04:54:22 +0000
commite68d7437535b85a840b0958a4ff2d98210e399f4 (patch)
tree72c96b87000bbbda00090d4d7542024ac5664344 /unittests/Support/AlignOfTest.cpp
parent953663a9aaa6a49f21381f8b19b1b1a74d571d77 (diff)
downloadllvm-e68d7437535b85a840b0958a4ff2d98210e399f4.tar.gz
llvm-e68d7437535b85a840b0958a4ff2d98210e399f4.tar.bz2
llvm-e68d7437535b85a840b0958a4ff2d98210e399f4.tar.xz
Suppressing the 'direct base ‘{anonymous}::S1’ inaccessible in ‘{anonymous}::D9’
due to ambiguity' warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168251 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Support/AlignOfTest.cpp')
-rw-r--r--unittests/Support/AlignOfTest.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/unittests/Support/AlignOfTest.cpp b/unittests/Support/AlignOfTest.cpp
index f01e660939..15935446fb 100644
--- a/unittests/Support/AlignOfTest.cpp
+++ b/unittests/Support/AlignOfTest.cpp
@@ -22,6 +22,18 @@ namespace {
#pragma warning(disable:4584)
#endif
+// Suppress direct base ‘{anonymous}::S1’ inaccessible in ‘{anonymous}::D9’
+// due to ambiguity warning.
+//
+// Pragma based warning suppression was introduced in GGC 4.2. Additionally
+// this warning is "enabled by default". The warning still appears if -Wall is
+// suppressed. Apparently GCC suppresses it when -w is specifed, which is odd.
+// At any rate, clang on the other hand gripes about -Wunknown-pragma, so
+// leaving it out of this.
+#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 && !defined(__clang__)
+#pragma GCC diagnostic warning "-w"
+#endif
+
// Define some fixed alignment types to use in these tests.
#if __has_feature(cxx_alignas)
struct alignas(1) A1 { };