aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2017-06-16 09:13:37 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2017-06-16 09:13:37 +0100
commit6ec3c9c841aea8b492aa2fc0db5d3c734b643725 (patch)
treee14d7f0358d355c68981d6cc13f337536e08e47e
parent32e37414af3e1e236a2c7400c9d7178ede77ce4d (diff)
downloadgcc-6ec3c9c841aea8b492aa2fc0db5d3c734b643725.zip
gcc-6ec3c9c841aea8b492aa2fc0db5d3c734b643725.tar.gz
gcc-6ec3c9c841aea8b492aa2fc0db5d3c734b643725.tar.bz2
Fix missing returns in libstdc++ header and tests
* include/bits/locale_conv.h (wbuffer_convert::_M_put): Add missing return statement. * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc: Return void. * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc: Likewise. * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc: Add missing return statements. * testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc: Return void. * testsuite/special_functions/14_expint/pr68397.cc: Likewise. From-SVN: r249238
-rw-r--r--libstdc++-v3/ChangeLog16
-rw-r--r--libstdc++-v3/include/bits/locale_conv.h1
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/1.cc2
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/map/modifiers/insert_or_assign/1.cc2
-rw-r--r--libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc2
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc2
-rw-r--r--libstdc++-v3/testsuite/special_functions/14_expint/pr68397.cc2
8 files changed, 25 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 26b3075..09d1abe 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,19 @@
+2017-06-16 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/locale_conv.h (wbuffer_convert::_M_put): Add missing
+ return statement.
+ * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
+ Return void.
+ * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
+ Likewise.
+ * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc: Add
+ missing return statements.
+ * testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
+ Likewise.
+ * testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc:
+ Return void.
+ * testsuite/special_functions/14_expint/pr68397.cc: Likewise.
+
2017-06-16 François Dumont <fdumont@gcc.gnu.org>
* include/bits/stl_bvector.h
diff --git a/libstdc++-v3/include/bits/locale_conv.h b/libstdc++-v3/include/bits/locale_conv.h
index 9b952d4..74beaec 100644
--- a/libstdc++-v3/include/bits/locale_conv.h
+++ b/libstdc++-v3/include/bits/locale_conv.h
@@ -482,6 +482,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
{
if (_M_buf->sputn(__p, __n) < __n)
return false;
+ return true;
}
// convert the put area and write to the byte stream buffer
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/1.cc
index 88a74f6..c2d1951 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/1.cc
@@ -22,7 +22,7 @@
#include <string_view>
#include <testsuite_hooks.h>
-bool
+void
test01()
{
typedef std::string_view::size_type csize_type;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc
index 0e625d6..957c80c 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc
@@ -22,7 +22,7 @@
#include <string_view>
#include <testsuite_hooks.h>
-bool
+void
test01()
{
typedef std::wstring_view::size_type csize_type;
diff --git a/libstdc++-v3/testsuite/23_containers/map/modifiers/insert_or_assign/1.cc b/libstdc++-v3/testsuite/23_containers/map/modifiers/insert_or_assign/1.cc
index 48c17eb..aaf5d8a 100644
--- a/libstdc++-v3/testsuite/23_containers/map/modifiers/insert_or_assign/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/map/modifiers/insert_or_assign/1.cc
@@ -39,10 +39,12 @@ struct Val
{
val = other.val;
other.moved_from_assign = true;
+ return *this;
}
Val& operator=(const Val& other)
{
val = other.val;
+ return *this;
}
};
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc
index 67fd164..d4b9601 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc
@@ -38,10 +38,12 @@ struct Val
{
val = other.val;
other.moved_from_assign = true;
+ return *this;
}
Val& operator=(const Val& other)
{
val = other.val;
+ return *this;
}
};
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc
index 24cd2f5..7e3b773 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc
@@ -50,7 +50,7 @@ void test12_aux(bool integer_type)
VERIFY(is.fail());
}
-bool test12()
+void test12()
{
test12_aux<short>(true);
test12_aux<int>(true);
diff --git a/libstdc++-v3/testsuite/special_functions/14_expint/pr68397.cc b/libstdc++-v3/testsuite/special_functions/14_expint/pr68397.cc
index 8da16d1..9527f40 100644
--- a/libstdc++-v3/testsuite/special_functions/14_expint/pr68397.cc
+++ b/libstdc++-v3/testsuite/special_functions/14_expint/pr68397.cc
@@ -23,7 +23,7 @@
#include <cmath>
#include <testsuite_hooks.h>
-int
+void
test01()
{
// Answers from Wolfram Alpha.