X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=libstdc%2B%2B-v3%2Ftestsuite%2F20_util%2Fis_floating_point%2Fvalue.cc;h=5dbdbf84d9908b8b9db11a46a0f586c28c3d9671;hb=99dee82307f1e163e150c9c810452979994047ce;hp=df9cfcaa5bc97f563e725318976e2f826b53d3e6;hpb=fd1e62c239e732536345e8c6102669923455dd89;p=thirdparty%2Fgcc.git diff --git a/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc b/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc index df9cfcaa5bc9..5dbdbf84d990 100644 --- a/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc +++ b/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc @@ -1,6 +1,7 @@ -// { dg-options "-std=gnu++0x" } +// { dg-options "-Wno-pedantic" } +// { dg-do compile { target c++11 } } // -// Copyright (C) 2011 Free Software Foundation, Inc. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -18,51 +19,47 @@ // . #include -#include #include void test01() { - bool test __attribute__((unused)) = true; using std::is_floating_point; using namespace __gnu_test; - VERIFY( (test_category(false)) ); - VERIFY( (test_category(false)) ); - VERIFY( (test_category(false)) ); - VERIFY( (test_category(false)) ); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); #ifdef _GLIBCXX_USE_WCHAR_T - VERIFY( (test_category(false)) ); + static_assert(test_category(false), ""); #endif - VERIFY( (test_category(false)) ); - VERIFY( (test_category(false)) ); - VERIFY( (test_category(false)) ); - VERIFY( (test_category(false)) ); - VERIFY( (test_category(false)) ); - VERIFY( (test_category(false)) ); - VERIFY( (test_category(false)) ); - VERIFY( (test_category(false)) ); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); - VERIFY( (test_category(true)) ); - VERIFY( (test_category(true)) ); - VERIFY( (test_category(true)) ); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); +#ifndef __STRICT_ANSI__ // GNU Extensions. #ifdef _GLIBCXX_USE_FLOAT128 - VERIFY( (test_category(true)) ); + static_assert(test_category(true), ""); #endif #ifdef _GLIBCXX_USE_INT128 - VERIFY( (test_category(false)) ); - VERIFY( (test_category(false)) ); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); +#endif #endif // Sanity check. - VERIFY( (test_category(false)) ); -} - -int main() -{ - test01(); - return 0; + static_assert(test_category(false), ""); }