diff --git a/test/aligned_storage_a2_test.cpp b/test/aligned_storage_a2_test.cpp index f339359..229f402 100644 --- a/test/aligned_storage_a2_test.cpp +++ b/test/aligned_storage_a2_test.cpp @@ -35,7 +35,14 @@ template void do_check(const T&) { typedef typename tt::aligned_storage::type t1; +#if defined(BOOST_GCC) && (BOOST_GCC < 40800) + // In order to test this with warnings-as-errors with GCC, we need + // a slightly different initializer here to suppress spurious + // GCC warnings (ie to work around a GCC buglet). + t1 as1 = {{{ 0, }}}; +#else t1 as1 = { 0, }; +#endif must_be_pod pod1; no_unused_warning(as1); no_unused_warning(pod1); @@ -46,7 +53,11 @@ void do_check(const T&) BOOST_CHECK(::tt::is_pod::value == true); #endif typedef typename tt::aligned_storage::type t2; +#if defined(BOOST_GCC) && (BOOST_GCC < 40800) + t2 as2 = {{{ 0, }}}; +#else t2 as2 = { 0, }; +#endif must_be_pod pod2; no_unused_warning(as2); no_unused_warning(pod2); @@ -60,7 +71,11 @@ void do_check(const T&) #ifndef TEST_STD // Non-Tr1 behaviour: typedef typename tt::aligned_storage::type t3; +#if defined(BOOST_GCC) && (BOOST_GCC < 40800) + t3 as3 = {{{ 0, }}}; +#else t3 as3 = { 0, }; +#endif must_be_pod pod3; no_unused_warning(as3); no_unused_warning(pod3);