From 035fc9aa9f64575b394b22d9ccfa453424d7e4ec Mon Sep 17 00:00:00 2001 From: Joe Abbey Date: Sat, 17 Nov 2012 04:54:22 +0000 Subject: [PATCH] =?utf8?q?Suppressing=20the=20'direct=20base=20=E2=80=98{a?= =?utf8?q?nonymous}::S1=E2=80=99=20inaccessible=20in=20=E2=80=98{anonymous?= =?utf8?q?}::D9=E2=80=99=20due=20to=20ambiguity'=20warning.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit llvm-svn: 168251 --- llvm/unittests/Support/AlignOfTest.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/llvm/unittests/Support/AlignOfTest.cpp b/llvm/unittests/Support/AlignOfTest.cpp index f01e660..1593544 100644 --- a/llvm/unittests/Support/AlignOfTest.cpp +++ b/llvm/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 { }; -- 2.7.4