Browse files

Suppressing the 'direct base ‘{anonymous}::S1’ inaccessible in ‘{anon…


due to ambiguity' warning.

git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information...
Joe Abbey
Joe Abbey committed Nov 17, 2012
1 parent 2442fe3 commit 56dff74286f9565a20697db20e4524d9a5ef04ca
Showing with 12 additions and 0 deletions.
  1. +12 −0 unittests/Support/AlignOfTest.cpp
@@ -22,6 +22,18 @@ namespace {
#pragma warning(disable:4584)
+// 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"
// Define some fixed alignment types to use in these tests.
#if __has_feature(cxx_alignas)
struct alignas(1) A1 { };

0 comments on commit 56dff74

Please sign in to comment.