From: Paolo Carlini Date: Mon, 6 Nov 2017 12:55:35 +0000 (+0000) Subject: deduction.cc: Avoid -Wreturn-type warnings. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=98910bc2b97f248d158b301575c24597fd12ab34;p=gcc.git deduction.cc: Avoid -Wreturn-type warnings. 2017-11-06 Paolo Carlini * testsuite/20_util/optional/cons/deduction.cc: Avoid -Wreturn-type warnings. * testsuite/20_util/pair/cons/deduction.cc: Likewise. * testsuite/20_util/pair/traits.cc: Likewise. * testsuite/20_util/tuple/cons/deduction.cc: Likewise. * testsuite/20_util/variant/compile.cc: Likewise. * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise. * testsuite/23_containers/unordered_map/modifiers/try_emplace.cc: Likewise. From-SVN: r254450 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c18a5bed188..70061e93779 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,15 @@ +2017-11-06 Paolo Carlini + + * testsuite/20_util/optional/cons/deduction.cc: Avoid -Wreturn-type + warnings. + * testsuite/20_util/pair/cons/deduction.cc: Likewise. + * testsuite/20_util/pair/traits.cc: Likewise. + * testsuite/20_util/tuple/cons/deduction.cc: Likewise. + * testsuite/20_util/variant/compile.cc: Likewise. + * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise. + * testsuite/23_containers/unordered_map/modifiers/try_emplace.cc: + Likewise. + 2017-11-05 Gerald Pfeifer * doc/xml/manual/abi.xml: Move docs.oracle.com references to https. diff --git a/libstdc++-v3/testsuite/20_util/optional/cons/deduction.cc b/libstdc++-v3/testsuite/20_util/optional/cons/deduction.cc index e15db0bc1ec..77d4ff82fc8 100644 --- a/libstdc++-v3/testsuite/20_util/optional/cons/deduction.cc +++ b/libstdc++-v3/testsuite/20_util/optional/cons/deduction.cc @@ -24,8 +24,8 @@ struct MoveOnly { MoveOnly() = default; - MoveOnly(MoveOnly&&) {} - MoveOnly& operator=(MoveOnly&&) {} + MoveOnly(MoveOnly&&); + MoveOnly& operator=(MoveOnly&&); }; int main() diff --git a/libstdc++-v3/testsuite/20_util/pair/cons/deduction.cc b/libstdc++-v3/testsuite/20_util/pair/cons/deduction.cc index 3831cf2316f..5071b13655d 100644 --- a/libstdc++-v3/testsuite/20_util/pair/cons/deduction.cc +++ b/libstdc++-v3/testsuite/20_util/pair/cons/deduction.cc @@ -30,8 +30,8 @@ template struct MoveOnly { MoveOnly() = default; - MoveOnly(MoveOnly&&) {} - MoveOnly& operator=(MoveOnly&&) {} + MoveOnly(MoveOnly&&); + MoveOnly& operator=(MoveOnly&&); }; void diff --git a/libstdc++-v3/testsuite/20_util/pair/traits.cc b/libstdc++-v3/testsuite/20_util/pair/traits.cc index 25ba7ffa125..69481544c75 100644 --- a/libstdc++-v3/testsuite/20_util/pair/traits.cc +++ b/libstdc++-v3/testsuite/20_util/pair/traits.cc @@ -31,8 +31,8 @@ struct Poison struct ThrowingCopy { - ThrowingCopy(const ThrowingCopy&) {} - ThrowingCopy& operator=(const ThrowingCopy&) {} + ThrowingCopy(const ThrowingCopy&); + ThrowingCopy& operator=(const ThrowingCopy&); }; int main() diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/deduction.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/deduction.cc index 0804d5584e3..2ca97098ee3 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/cons/deduction.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/cons/deduction.cc @@ -30,8 +30,8 @@ template struct MoveOnly { MoveOnly() = default; - MoveOnly(MoveOnly&&) {} - MoveOnly& operator=(MoveOnly&&) {} + MoveOnly(MoveOnly&&); + MoveOnly& operator=(MoveOnly&&); }; void diff --git a/libstdc++-v3/testsuite/20_util/variant/compile.cc b/libstdc++-v3/testsuite/20_util/variant/compile.cc index e5f7538ba42..2aeec7d2696 100644 --- a/libstdc++-v3/testsuite/20_util/variant/compile.cc +++ b/libstdc++-v3/testsuite/20_util/variant/compile.cc @@ -481,37 +481,37 @@ void test_triviality() static_assert(MA_VAL == is_trivially_move_assignable_v>, ""); \ } TEST_TEMPLATE(=default, =default, =default, =default, =default, true, true, true, true) - TEST_TEMPLATE(=default, =default, =default, =default, {}, true, true, true, false) - TEST_TEMPLATE(=default, =default, =default, {}, =default, true, true, false, true) - TEST_TEMPLATE(=default, =default, =default, {}, {}, true, true, false, false) - TEST_TEMPLATE(=default, =default, {}, =default, =default, true, false, true, true) - TEST_TEMPLATE(=default, =default, {}, =default, {}, true, false, true, false) - TEST_TEMPLATE(=default, =default, {}, {}, =default, true, false, false, true) - TEST_TEMPLATE(=default, =default, {}, {}, {}, true, false, false, false) - TEST_TEMPLATE(=default, {}, =default, =default, =default, false, true, true, true) - TEST_TEMPLATE(=default, {}, =default, =default, {}, false, true, true, false) - TEST_TEMPLATE(=default, {}, =default, {}, =default, false, true, false, true) - TEST_TEMPLATE(=default, {}, =default, {}, {}, false, true, false, false) - TEST_TEMPLATE(=default, {}, {}, =default, =default, false, false, true, true) - TEST_TEMPLATE(=default, {}, {}, =default, {}, false, false, true, false) - TEST_TEMPLATE(=default, {}, {}, {}, =default, false, false, false, true) - TEST_TEMPLATE(=default, {}, {}, {}, {}, false, false, false, false) - TEST_TEMPLATE( {}, =default, =default, =default, =default, false, false, false, false) - TEST_TEMPLATE( {}, =default, =default, =default, {}, false, false, false, false) - TEST_TEMPLATE( {}, =default, =default, {}, =default, false, false, false, false) - TEST_TEMPLATE( {}, =default, =default, {}, {}, false, false, false, false) - TEST_TEMPLATE( {}, =default, {}, =default, =default, false, false, false, false) - TEST_TEMPLATE( {}, =default, {}, =default, {}, false, false, false, false) - TEST_TEMPLATE( {}, =default, {}, {}, =default, false, false, false, false) - TEST_TEMPLATE( {}, =default, {}, {}, {}, false, false, false, false) - TEST_TEMPLATE( {}, {}, =default, =default, =default, false, false, false, false) - TEST_TEMPLATE( {}, {}, =default, =default, {}, false, false, false, false) - TEST_TEMPLATE( {}, {}, =default, {}, =default, false, false, false, false) - TEST_TEMPLATE( {}, {}, =default, {}, {}, false, false, false, false) - TEST_TEMPLATE( {}, {}, {}, =default, =default, false, false, false, false) - TEST_TEMPLATE( {}, {}, {}, =default, {}, false, false, false, false) - TEST_TEMPLATE( {}, {}, {}, {}, =default, false, false, false, false) - TEST_TEMPLATE( {}, {}, {}, {}, {}, false, false, false, false) + TEST_TEMPLATE(=default, =default, =default, =default, , true, true, true, false) + TEST_TEMPLATE(=default, =default, =default, , =default, true, true, false, true) + TEST_TEMPLATE(=default, =default, =default, , , true, true, false, false) + TEST_TEMPLATE(=default, =default, , =default, =default, true, false, true, true) + TEST_TEMPLATE(=default, =default, , =default, , true, false, true, false) + TEST_TEMPLATE(=default, =default, , , =default, true, false, false, true) + TEST_TEMPLATE(=default, =default, , , , true, false, false, false) + TEST_TEMPLATE(=default, , =default, =default, =default, false, true, true, true) + TEST_TEMPLATE(=default, , =default, =default, , false, true, true, false) + TEST_TEMPLATE(=default, , =default, , =default, false, true, false, true) + TEST_TEMPLATE(=default, , =default, , , false, true, false, false) + TEST_TEMPLATE(=default, , , =default, =default, false, false, true, true) + TEST_TEMPLATE(=default, , , =default, , false, false, true, false) + TEST_TEMPLATE(=default, , , , =default, false, false, false, true) + TEST_TEMPLATE(=default, , , , , false, false, false, false) + TEST_TEMPLATE( , =default, =default, =default, =default, false, false, false, false) + TEST_TEMPLATE( , =default, =default, =default, , false, false, false, false) + TEST_TEMPLATE( , =default, =default, , =default, false, false, false, false) + TEST_TEMPLATE( , =default, =default, , , false, false, false, false) + TEST_TEMPLATE( , =default, , =default, =default, false, false, false, false) + TEST_TEMPLATE( , =default, , =default, , false, false, false, false) + TEST_TEMPLATE( , =default, , , =default, false, false, false, false) + TEST_TEMPLATE( , =default, , , , false, false, false, false) + TEST_TEMPLATE( , , =default, =default, =default, false, false, false, false) + TEST_TEMPLATE( , , =default, =default, , false, false, false, false) + TEST_TEMPLATE( , , =default, , =default, false, false, false, false) + TEST_TEMPLATE( , , =default, , , false, false, false, false) + TEST_TEMPLATE( , , , =default, =default, false, false, false, false) + TEST_TEMPLATE( , , , =default, , false, false, false, false) + TEST_TEMPLATE( , , , , =default, false, false, false, false) + TEST_TEMPLATE( , , , , , false, false, false, false) #undef TEST_TEMPLATE #define TEST_TEMPLATE(CC, MC, CA, MA) \ @@ -529,21 +529,21 @@ void test_triviality() static_assert(!is_trivially_move_assignable_v>, ""); \ } TEST_TEMPLATE(=default, =default, =default, =default) - TEST_TEMPLATE(=default, =default, =default, {}) - TEST_TEMPLATE(=default, =default, {}, =default) - TEST_TEMPLATE(=default, =default, {}, {}) - TEST_TEMPLATE(=default, {}, =default, =default) - TEST_TEMPLATE(=default, {}, =default, {}) - TEST_TEMPLATE(=default, {}, {}, =default) - TEST_TEMPLATE(=default, {}, {}, {}) - TEST_TEMPLATE( {}, =default, =default, =default) - TEST_TEMPLATE( {}, =default, =default, {}) - TEST_TEMPLATE( {}, =default, {}, =default) - TEST_TEMPLATE( {}, =default, {}, {}) - TEST_TEMPLATE( {}, {}, =default, =default) - TEST_TEMPLATE( {}, {}, =default, {}) - TEST_TEMPLATE( {}, {}, {}, =default) - TEST_TEMPLATE( {}, {}, {}, {}) + TEST_TEMPLATE(=default, =default, =default, ) + TEST_TEMPLATE(=default, =default, , =default) + TEST_TEMPLATE(=default, =default, , ) + TEST_TEMPLATE(=default, , =default, =default) + TEST_TEMPLATE(=default, , =default, ) + TEST_TEMPLATE(=default, , , =default) + TEST_TEMPLATE(=default, , , ) + TEST_TEMPLATE( , =default, =default, =default) + TEST_TEMPLATE( , =default, =default, ) + TEST_TEMPLATE( , =default, , =default) + TEST_TEMPLATE( , =default, , ) + TEST_TEMPLATE( , , =default, =default) + TEST_TEMPLATE( , , =default, ) + TEST_TEMPLATE( , , , =default) + TEST_TEMPLATE( , , , ) #undef TEST_TEMPLATE static_assert(is_trivially_copy_constructible_v>, ""); diff --git a/libstdc++-v3/testsuite/23_containers/map/modifiers/try_emplace/1.cc b/libstdc++-v3/testsuite/23_containers/map/modifiers/try_emplace/1.cc index e4c883c2a51..22aa9d4234e 100644 --- a/libstdc++-v3/testsuite/23_containers/map/modifiers/try_emplace/1.cc +++ b/libstdc++-v3/testsuite/23_containers/map/modifiers/try_emplace/1.cc @@ -39,6 +39,7 @@ struct Val { val = other.val; other.moved_from_assign = true; + return *this; } }; diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/try_emplace.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/try_emplace.cc index f123850ecf1..b07d44ba9bb 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/try_emplace.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/try_emplace.cc @@ -39,6 +39,7 @@ struct Val { val = other.val; other.moved_from_assign = true; + return *this; } };