From: Jonathan Wakely Date: Mon, 1 Aug 2016 12:17:43 +0000 (+0100) Subject: Run std::ios_base enum tests for C++11 and up X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b46e4d6dd90b2569c002d5c810eaaf172ac252f;p=gcc.git Run std::ios_base enum tests for C++11 and up * testsuite/27_io/ios_base/types/fmtflags/case_label.cc: Make test supported for C++11 and later. * testsuite/27_io/ios_base/types/iostate/case_label.cc: Likewise. * testsuite/27_io/ios_base/types/openmode/case_label.cc: Likewise. From-SVN: r238939 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 74e0e3e3347..63ed47819b3 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2016-08-01 Jonathan Wakely + + * testsuite/27_io/ios_base/types/fmtflags/case_label.cc: Make test + supported for C++11 and later. + * testsuite/27_io/ios_base/types/iostate/case_label.cc: Likewise. + * testsuite/27_io/ios_base/types/openmode/case_label.cc: Likewise. + 2016-08-01 Uros Bizjak * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update. diff --git a/libstdc++-v3/testsuite/27_io/ios_base/types/fmtflags/case_label.cc b/libstdc++-v3/testsuite/27_io/ios_base/types/fmtflags/case_label.cc index d786e103438..c0e94877aac 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base/types/fmtflags/case_label.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base/types/fmtflags/case_label.cc @@ -1,5 +1,5 @@ -// { dg-do compile } -// { dg-options "-Wall" { target *-*-* } } +// { dg-do compile { target c++11 } } +// { dg-options "-Wall" } // -*- C++ -*- // Copyright (C) 2004-2016 Free Software Foundation, Inc. @@ -75,6 +75,7 @@ case_labels(bitmask_type b) case ~__INT_MAX__: break; } - static_assert( sizeof(std::underlying_type_t) == sizeof(int), + using underlying_type = std::underlying_type::type; + static_assert( sizeof(underlying_type) == sizeof(int), "underlying type has same range of values as int"); } diff --git a/libstdc++-v3/testsuite/27_io/ios_base/types/iostate/case_label.cc b/libstdc++-v3/testsuite/27_io/ios_base/types/iostate/case_label.cc index 7d777b89c67..5ca9f5f8759 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base/types/iostate/case_label.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base/types/iostate/case_label.cc @@ -1,5 +1,5 @@ -// { dg-do compile } -// { dg-options "-Wall" { target *-*-* } } +// { dg-do compile { target c++11 } } +// { dg-options "-Wall" } // -*- C++ -*- // Copyright (C) 2004-2016 Free Software Foundation, Inc. @@ -47,6 +47,7 @@ case_labels(bitmask_type b) case ~__INT_MAX__: break; } - static_assert( sizeof(std::underlying_type_t) == sizeof(int), + using underlying_type = std::underlying_type::type; + static_assert( sizeof(underlying_type) == sizeof(int), "underlying type has same range of values as int"); } diff --git a/libstdc++-v3/testsuite/27_io/ios_base/types/openmode/case_label.cc b/libstdc++-v3/testsuite/27_io/ios_base/types/openmode/case_label.cc index bb9e96e260c..14a4984105b 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base/types/openmode/case_label.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base/types/openmode/case_label.cc @@ -1,5 +1,5 @@ -// { dg-do compile } -// { dg-options "-Wall" { target *-*-* } } +// { dg-do compile { target c++11 } } +// { dg-options "-Wall" } // -*- C++ -*- // Copyright (C) 2004-2016 Free Software Foundation, Inc. @@ -51,6 +51,7 @@ case_labels(bitmask_type b) case ~__INT_MAX__: break; } - static_assert( sizeof(std::underlying_type_t) == sizeof(int), + using underlying_type = std::underlying_type::type; + static_assert( sizeof(underlying_type) == sizeof(int), "underlying type has same range of values as int"); }