]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix testsuite bugs.
authorJonathan Wakely <jwakely@redhat.com>
Mon, 7 Apr 2014 18:40:18 +0000 (19:40 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 7 Apr 2014 18:40:18 +0000 (19:40 +0100)
* 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

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/20_util/exchange/1.cc
libstdc++-v3/testsuite/20_util/pair/40925.cc
libstdc++-v3/testsuite/22_locale/codecvt_byname/50714.cc

index c65abca0943d5691321dc60105b1199a6a03188c..dfab69de0d7cef8c04b839d031aca187c4013007 100644 (file)
@@ -1,3 +1,10 @@
+2014-04-07  Jonathan Wakely  <jwakely@redhat.com>
+
+       * 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  <dominiq@lps.ens.fr>
            Jack Howarth <howarth@bromo.med.uc.edu>
 
index 923920edda777f659adaa21e3754f8b6c95ec5ed..2f8825d1ecaa72f216eb5b3c7ac56d9d1990e4c0 100644 (file)
@@ -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;
index 599fd3875e592b85c695273e31052a4f884c4974..5b34a626eb1769c19565fc06e1049820b528d2c2 100644 (file)
@@ -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<move_only, int*> p15(move_only(), ip);
   std::pair<move_only, int X::*> p16(move_only(), mp);
 
-  std::pair<move_only, move_only> p17(move_only(), move_only());
+  std::pair<move_only, move_only> p17{move_only(), move_only()};
 }
index e40717ba16875962c80f92032e84f9d70bf0a7f2..d42caa54e0583903e61e5561753d4bc7119fbd2a 100644 (file)
@@ -52,12 +52,12 @@ namespace std
 
   template<>
   int
-  codecvt<mychar, char, mbstate_t>::do_encoding() const
+  codecvt<mychar, char, mbstate_t>::do_encoding() const throw()
   { return 0; }
 
   template<>
   bool
-  codecvt<mychar, char, mbstate_t>::do_always_noconv() const
+  codecvt<mychar, char, mbstate_t>::do_always_noconv() const throw()
   { return false; }
 
   template<>
@@ -69,7 +69,7 @@ namespace std
 
   template<>
   int
-  codecvt<mychar, char, mbstate_t>::do_max_length() const
+  codecvt<mychar, char, mbstate_t>::do_max_length() const throw()
   { return 4; }
 }