From: Felix Morgner Date: Wed, 23 Nov 2016 14:45:29 +0000 (+0000) Subject: PR78494 add missing returns to propagate_const X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f6cdfe826444e1a0b52b271588fbef5c2a4bac4d;p=gcc.git PR78494 add missing returns to propagate_const 2016-11-23 Felix Morgner Jonathan Wakely PR libstdc++/78494 * include/experimental/propagate_const (propagate_const::operator=): Add missing return statements. * testsuite/experimental/propagate_const/assignment/move_neg.cc: Adjust dg-error line numbers. * testsuite/experimental/propagate_const/requirements2.cc: Likewise. Co-Authored-By: Jonathan Wakely From-SVN: r242760 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 70197d9eb1f..3ee623cdaf2 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,13 @@ +2016-11-23 Felix Morgner + Jonathan Wakely + + PR libstdc++/78494 + * include/experimental/propagate_const (propagate_const::operator=): + Add missing return statements. + * testsuite/experimental/propagate_const/assignment/move_neg.cc: + Adjust dg-error line numbers. + * testsuite/experimental/propagate_const/requirements2.cc: Likewise. + 2016-11-22 Uros Bizjak * testsuite/Makefile.am diff --git a/libstdc++-v3/include/experimental/propagate_const b/libstdc++-v3/include/experimental/propagate_const index 5f32111fbba..635d4ed39fc 100644 --- a/libstdc++-v3/include/experimental/propagate_const +++ b/libstdc++-v3/include/experimental/propagate_const @@ -156,6 +156,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION constexpr propagate_const& operator=(propagate_const<_Up>&& __pu) { _M_t = std::move(get_underlying(__pu)); + return *this; } template (__u); + return *this; } // [propagate_const.const_observers], const observers diff --git a/libstdc++-v3/testsuite/experimental/propagate_const/assignment/move_neg.cc b/libstdc++-v3/testsuite/experimental/propagate_const/assignment/move_neg.cc index 0dc72a214f4..1423220abe8 100644 --- a/libstdc++-v3/testsuite/experimental/propagate_const/assignment/move_neg.cc +++ b/libstdc++-v3/testsuite/experimental/propagate_const/assignment/move_neg.cc @@ -25,7 +25,7 @@ using std::experimental::propagate_const; using std::unique_ptr; -// { dg-error "no type" "" { target *-*-* } 161 } +// { dg-error "no type" "" { target *-*-* } 162 } int main() { diff --git a/libstdc++-v3/testsuite/experimental/propagate_const/requirements2.cc b/libstdc++-v3/testsuite/experimental/propagate_const/requirements2.cc index 199be37a1a6..d713911d897 100644 --- a/libstdc++-v3/testsuite/experimental/propagate_const/requirements2.cc +++ b/libstdc++-v3/testsuite/experimental/propagate_const/requirements2.cc @@ -23,7 +23,7 @@ using std::experimental::propagate_const; // { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 107 } // { dg-error "not a pointer-to-object type" "" { target *-*-* } 68 } -// { dg-error "forming pointer to reference type" "" { target *-*-* } 187 } -// { dg-error "forming pointer to reference type" "" { target *-*-* } 213 } +// { dg-error "forming pointer to reference type" "" { target *-*-* } 189 } +// { dg-error "forming pointer to reference type" "" { target *-*-* } 215 } propagate_const test1;