From: Jonathan Wakely Date: Mon, 7 Apr 2014 18:40:18 +0000 (+0100) Subject: Fix testsuite bugs. X-Git-Tag: basepoints/gcc-5~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=631e3e1b75a52e1cd8c0da794b856781ca912856;p=thirdparty%2Fgcc.git Fix testsuite bugs. * testsuite/20_util/exchange/1.cc: Add missing return statements. * testsuite/20_util/pair/40925.cc: Avoid most vexing parse. * testsuite/22_locale/codecvt_byname/50714.cc: Add missing exception specifications. From-SVN: r209196 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c65abca0943d..dfab69de0d7c 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2014-04-07 Jonathan Wakely + + * testsuite/20_util/exchange/1.cc: Add missing return statements. + * testsuite/20_util/pair/40925.cc: Avoid most vexing parse. + * testsuite/22_locale/codecvt_byname/50714.cc: Add missing exception + specifications. + 2014-04-02 Dominique d'Humieres Jack Howarth diff --git a/libstdc++-v3/testsuite/20_util/exchange/1.cc b/libstdc++-v3/testsuite/20_util/exchange/1.cc index 923920edda77..2f8825d1ecaa 100644 --- a/libstdc++-v3/testsuite/20_util/exchange/1.cc +++ b/libstdc++-v3/testsuite/20_util/exchange/1.cc @@ -78,8 +78,8 @@ void test04() To() = default; To(const To&) = default; To(const From&) = delete; - To& operator=(const From&) { value = 1; } - To& operator=(From&&) { value = 2; } + To& operator=(const From&) { value = 1; return *this; } + To& operator=(From&&) { value = 2; return *this; } }; To t; diff --git a/libstdc++-v3/testsuite/20_util/pair/40925.cc b/libstdc++-v3/testsuite/20_util/pair/40925.cc index 599fd3875e59..5b34a626eb17 100644 --- a/libstdc++-v3/testsuite/20_util/pair/40925.cc +++ b/libstdc++-v3/testsuite/20_util/pair/40925.cc @@ -1,4 +1,4 @@ -// { dg-options "-std=gnu++0x" } +// { dg-options "-std=gnu++11" } // { dg-do compile } // Copyright (C) 2009-2014 Free Software Foundation, Inc. @@ -63,5 +63,5 @@ void test01() std::pair p15(move_only(), ip); std::pair p16(move_only(), mp); - std::pair p17(move_only(), move_only()); + std::pair p17{move_only(), move_only()}; } diff --git a/libstdc++-v3/testsuite/22_locale/codecvt_byname/50714.cc b/libstdc++-v3/testsuite/22_locale/codecvt_byname/50714.cc index e40717ba1687..d42caa54e058 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt_byname/50714.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt_byname/50714.cc @@ -52,12 +52,12 @@ namespace std template<> int - codecvt::do_encoding() const + codecvt::do_encoding() const throw() { return 0; } template<> bool - codecvt::do_always_noconv() const + codecvt::do_always_noconv() const throw() { return false; } template<> @@ -69,7 +69,7 @@ namespace std template<> int - codecvt::do_max_length() const + codecvt::do_max_length() const throw() { return 4; } }