diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-10-20 15:14:29 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-10-20 15:14:29 +0000 |
commit | 6ca0ec75db0bc22eb089a216500933930dee3910 (patch) | |
tree | c5c30e20b1cc4174d014f0a5fbd6bf64958f2cbc /libstdc++-v3/testsuite | |
parent | d4670a6a4c92dafb5ce6887d86aa6bed1c2b5ce4 (diff) |
PR libstdc++/79433 no #error for including headers with wrong -std
Backport from mainline
2017-09-12 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/79433
* doc/xml/manual/status_cxx2017.xml: Update feature-test macros.
* doc/html/*: Regenerate.
* include/Makefile.am: Remove <bits/c++17_warning.h>.
* include/Makefile.in: Regenerate.
* include/bits/c++17_warning.h: Remove.
* include/bits/string_view.tcc: Do not include <bits/c++17_warning.h>
for pre-C++17 modes.
* include/std/any: Likewise.
(__cpp_lib_any): Define.
* include/std/mutex (__cpp_lib_scoped_lock): Adjust value as per new
SD-6 draft.
* include/std/numeric (__cpp_lib_gcd_lcm): Define as per new SD-6
draft.
* include/std/optional: Do not include <bits/c++17_warning.h>.
(__cpp_lib_optional): Define.
* include/std/shared_mutex: Do not include <bits/c++14_warning.h>.
* include/std/string_view: Do not include <bits/c++17_warning.h>.
(__cpp_lib_string_view): Define.
* include/std/variant: Do not include <bits/c++17_warning.h>.
(__cpp_lib_variant): Define.
* testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error line
numbers.
* testsuite/26_numerics/gcd/1.cc: Test for __cpp_lib_gcd_lcm.
* testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line
numbers.
* testsuite/26_numerics/lcm/1.cc: Test for __cpp_lib_gcd_lcm.
* testsuite/26_numerics/lcm/lcm_neg.cc: Adjust dg-error line
numbers.
* testsuite/30_threads/scoped_lock/requirements/typedefs.cc: Adjust
expected value of __cpp_lib_scoped_lock.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@253943 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite')
6 files changed, 16 insertions, 16 deletions
diff --git a/libstdc++-v3/testsuite/20_util/optional/cons/value_neg.cc b/libstdc++-v3/testsuite/20_util/optional/cons/value_neg.cc index 87907f96d137..7af390386925 100644 --- a/libstdc++-v3/testsuite/20_util/optional/cons/value_neg.cc +++ b/libstdc++-v3/testsuite/20_util/optional/cons/value_neg.cc @@ -37,8 +37,8 @@ int main() std::optional<std::unique_ptr<int>> oup2 = new int; // { dg-error "conversion" } struct U { explicit U(std::in_place_t); }; std::optional<U> ou(std::in_place); // { dg-error "no matching" } - // { dg-error "no type" "" { target { *-*-* } } 488 } - // { dg-error "no type" "" { target { *-*-* } } 498 } - // { dg-error "no type" "" { target { *-*-* } } 555 } + // { dg-error "no type" "" { target { *-*-* } } 490 } + // { dg-error "no type" "" { target { *-*-* } } 500 } + // { dg-error "no type" "" { target { *-*-* } } 557 } } } diff --git a/libstdc++-v3/testsuite/26_numerics/gcd/1.cc b/libstdc++-v3/testsuite/26_numerics/gcd/1.cc index 17e97a7e0ae5..0f0b7b85b4e0 100644 --- a/libstdc++-v3/testsuite/26_numerics/gcd/1.cc +++ b/libstdc++-v3/testsuite/26_numerics/gcd/1.cc @@ -20,9 +20,9 @@ #include <numeric> -#ifndef __cpp_lib_gcd +#ifndef __cpp_lib_gcd_lcm # error "Feature-test macro for gcd missing" -#elif __cpp_lib_gcd != 201606 +#elif __cpp_lib_gcd_lcm != 201606 # error "Feature-test macro for gcd has wrong value" #endif diff --git a/libstdc++-v3/testsuite/26_numerics/gcd/gcd_neg.cc b/libstdc++-v3/testsuite/26_numerics/gcd/gcd_neg.cc index d88f145d7545..0fda1aad9060 100644 --- a/libstdc++-v3/testsuite/26_numerics/gcd/gcd_neg.cc +++ b/libstdc++-v3/testsuite/26_numerics/gcd/gcd_neg.cc @@ -31,9 +31,9 @@ test01() std::gcd(0.1, 0.1); // { dg-error "from here" } } -// { dg-error "integers" "" { target *-*-* } 134 } -// { dg-error "integers" "" { target *-*-* } 135 } -// { dg-error "not bools" "" { target *-*-* } 136 } -// { dg-error "not bools" "" { target *-*-* } 137 } +// { dg-error "integers" "" { target *-*-* } 138 } +// { dg-error "integers" "" { target *-*-* } 139 } +// { dg-error "not bools" "" { target *-*-* } 140 } +// { dg-error "not bools" "" { target *-*-* } 141 } // { dg-prune-output "deleted function" } // { dg-prune-output "invalid operands" } diff --git a/libstdc++-v3/testsuite/26_numerics/lcm/1.cc b/libstdc++-v3/testsuite/26_numerics/lcm/1.cc index 81cb91437ba2..367f0a3e0e3f 100644 --- a/libstdc++-v3/testsuite/26_numerics/lcm/1.cc +++ b/libstdc++-v3/testsuite/26_numerics/lcm/1.cc @@ -20,9 +20,9 @@ #include <numeric> -#ifndef __cpp_lib_lcm +#ifndef __cpp_lib_gcd_lcm # error "Feature-test macro for lcm missing" -#elif __cpp_lib_lcm != 201606 +#elif __cpp_lib_gcd_lcm != 201606 # error "Feature-test macro for lcm has wrong value" #endif diff --git a/libstdc++-v3/testsuite/26_numerics/lcm/lcm_neg.cc b/libstdc++-v3/testsuite/26_numerics/lcm/lcm_neg.cc index f2d828945314..b1c42803f422 100644 --- a/libstdc++-v3/testsuite/26_numerics/lcm/lcm_neg.cc +++ b/libstdc++-v3/testsuite/26_numerics/lcm/lcm_neg.cc @@ -31,9 +31,9 @@ test01() std::lcm(0.1, 0.1); // { dg-error "from here" } } -// { dg-error "integers" "" { target *-*-* } 147 } -// { dg-error "integers" "" { target *-*-* } 148 } -// { dg-error "not bools" "" { target *-*-* } 149 } -// { dg-error "not bools" "" { target *-*-* } 150 } +// { dg-error "integers" "" { target *-*-* } 150 } +// { dg-error "integers" "" { target *-*-* } 151 } +// { dg-error "not bools" "" { target *-*-* } 152 } +// { dg-error "not bools" "" { target *-*-* } 153 } // { dg-prune-output "deleted function" } // { dg-prune-output "invalid operands" } diff --git a/libstdc++-v3/testsuite/30_threads/scoped_lock/requirements/typedefs.cc b/libstdc++-v3/testsuite/30_threads/scoped_lock/requirements/typedefs.cc index 0a8903ebaab4..b8a09042094a 100644 --- a/libstdc++-v3/testsuite/30_threads/scoped_lock/requirements/typedefs.cc +++ b/libstdc++-v3/testsuite/30_threads/scoped_lock/requirements/typedefs.cc @@ -27,7 +27,7 @@ #ifndef __cpp_lib_scoped_lock # error "Feature-test macro for scoped_lock missing" -#elif __cpp_lib_scoped_lock != 201707 +#elif __cpp_lib_scoped_lock != 201703 # error "Feature-test macro for scoped_lock has wrong value" #endif |