* decl2.c (mark_used): Adjust error for use of deleted function.
From-SVN: r161580
This commit is contained in:
parent
ac1774315c
commit
9a71b305bf
@ -1,5 +1,7 @@
|
|||||||
2010-06-29 Jason Merrill <jason@redhat.com>
|
2010-06-29 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* decl2.c (mark_used): Adjust error for use of deleted function.
|
||||||
|
|
||||||
Machinery to support implicit delete/move.
|
Machinery to support implicit delete/move.
|
||||||
* cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
|
* cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
|
||||||
has_complex_move_ctor, has_complex_move_assign bitfields.
|
has_complex_move_ctor, has_complex_move_assign bitfields.
|
||||||
|
@ -4110,8 +4110,9 @@ mark_used (tree decl)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
error ("deleted function %q+D", decl);
|
error ("use of deleted function %qD", decl);
|
||||||
error ("used here");
|
if (!maybe_explain_implicit_delete (decl))
|
||||||
|
error_at (DECL_SOURCE_LOCATION (decl), "declared here");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* If we don't need a value, then we don't need to synthesize DECL. */
|
/* If we don't need a value, then we don't need to synthesize DECL. */
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
2010-06-29 Jason Merrill <jason@redhat.com>
|
2010-06-29 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* g++.dg/cpp0x/defaulted10.C: Adjust for new deleted message.
|
||||||
|
* g++.dg/cpp0x/defaulted13.C: Adjust.
|
||||||
|
* g++.dg/cpp0x/defaulted2.C: Adjust.
|
||||||
|
* g++.dg/cpp0x/defaulted3.C: Adjust.
|
||||||
|
* g++.dg/cpp0x/initlist9.C: Adjust.
|
||||||
|
* g++.dg/cpp0x/lambda/lambda-errloc.C: Adjust.
|
||||||
|
* g++.dg/cpp0x/lambda/lambda-errloc2.C: Adjust.
|
||||||
|
* g++.dg/init/synth2.C: Adjust.
|
||||||
|
|
||||||
* g++.dg/cpp0x/defaulted19.C: New.
|
* g++.dg/cpp0x/defaulted19.C: New.
|
||||||
|
|
||||||
* g++.dg/expr/string-1.C: Fix for -std=c++0x.
|
* g++.dg/expr/string-1.C: Fix for -std=c++0x.
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
struct A
|
struct A
|
||||||
{
|
{
|
||||||
template<typename T> void foo(T) = delete; // { dg-error "previously|deleted" }
|
template<typename T> void foo(T) = delete; // { dg-error "previously|declared" }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T> void A::foo(T) {} // { dg-error "redefinition" }
|
template<typename T> void A::foo(T) {} // { dg-error "redefinition" }
|
||||||
|
|
||||||
void bar()
|
void bar()
|
||||||
{
|
{
|
||||||
A().foo(0); // { dg-error "used" }
|
A().foo(0); // { dg-error "use" }
|
||||||
}
|
}
|
||||||
|
@ -7,22 +7,22 @@ struct NonCopyable {
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
NonCopyable<int>::NonCopyable(NonCopyable<int> const&) = delete; // { dg-error "deleted" }
|
NonCopyable<int>::NonCopyable(NonCopyable<int> const&) = delete; // { dg-error "declared" }
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
NonCopyable<T>::NonCopyable(NonCopyable<T> const&) = default;
|
NonCopyable<T>::NonCopyable(NonCopyable<T> const&) = default;
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
NonCopyable<double>::NonCopyable(NonCopyable<double> const&) = delete; // { dg-error "deleted" }
|
NonCopyable<double>::NonCopyable(NonCopyable<double> const&) = delete; // { dg-error "declared" }
|
||||||
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
NonCopyable<double> nc_dbl;
|
NonCopyable<double> nc_dbl;
|
||||||
NonCopyable<double> nc_dbl_cpy(nc_dbl); // { dg-error "used here" }
|
NonCopyable<double> nc_dbl_cpy(nc_dbl); // { dg-error "use" }
|
||||||
|
|
||||||
NonCopyable<int> nc_int;
|
NonCopyable<int> nc_int;
|
||||||
NonCopyable<int> nc_int_cpy(nc_int); // { dg-error "used here" }
|
NonCopyable<int> nc_int_cpy(nc_int); // { dg-error "use" }
|
||||||
|
|
||||||
NonCopyable<char> nc_char;
|
NonCopyable<char> nc_char;
|
||||||
NonCopyable<char> nc_char_cpy(nc_char);
|
NonCopyable<char> nc_char_cpy(nc_char);
|
||||||
|
@ -41,7 +41,7 @@ struct E
|
|||||||
struct F
|
struct F
|
||||||
{
|
{
|
||||||
F() = default;
|
F() = default;
|
||||||
F(const F&) = delete; // { dg-error "deleted" }
|
F(const F&) = delete; // { dg-error "declared" }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct G
|
struct G
|
||||||
@ -60,7 +60,7 @@ union U
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
F f;
|
F f;
|
||||||
F f2(f); // { dg-error "used" }
|
F f2(f); // { dg-error "use" }
|
||||||
B* b = new const B; // { dg-error "uninitialized const" }
|
B* b = new const B; // { dg-error "uninitialized const" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
template<class T>
|
template<class T>
|
||||||
struct A {
|
struct A {
|
||||||
template<class U>
|
template<class U>
|
||||||
bool operator==(const A<U>&) = delete; // { dg-error "deleted function" }
|
bool operator==(const A<U>&) = delete; // { dg-error "declared" }
|
||||||
operator bool () { return true; }
|
operator bool () { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -12,5 +12,5 @@ int main()
|
|||||||
{
|
{
|
||||||
A<int> a1;
|
A<int> a1;
|
||||||
A<void> a2;
|
A<void> a2;
|
||||||
if(a1 == a2) {} // { dg-error "used here" }
|
if(a1 == a2) {} // { dg-error "use" }
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ struct b
|
|||||||
b() = default;
|
b() = default;
|
||||||
~b() = default;
|
~b() = default;
|
||||||
b& operator=(const b&) = delete;
|
b& operator=(const b&) = delete;
|
||||||
b(const b&) = delete; // { dg-error "deleted" }
|
b(const b&) = delete; // { dg-error "declared" }
|
||||||
|
|
||||||
b(bool _t): t (_t) { }
|
b(bool _t): t (_t) { }
|
||||||
};
|
};
|
||||||
@ -19,7 +19,7 @@ int main()
|
|||||||
b tst1 = { false };
|
b tst1 = { false };
|
||||||
|
|
||||||
// copy initialization.
|
// copy initialization.
|
||||||
b tst2 = false; // { dg-error "used here" }
|
b tst2 = false; // { dg-error "use" }
|
||||||
|
|
||||||
// direct list initialization
|
// direct list initialization
|
||||||
b tst3 { false };
|
b tst3 { false };
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
struct A
|
struct A
|
||||||
{
|
{
|
||||||
A();
|
A();
|
||||||
A(const A& a) = delete; // { dg-error "deleted" }
|
A(const A& a) = delete; // { dg-error "declared" }
|
||||||
};
|
};
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
|
|
||||||
struct A {
|
struct A {
|
||||||
A();
|
A();
|
||||||
A(const A&) = delete; // { dg-error "deleted function" }
|
A(const A&) = delete; // { dg-error "declared" }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
void f()
|
void f()
|
||||||
{
|
{
|
||||||
T t;
|
T t;
|
||||||
[t] { return 0; }; // { dg-error "used here" }
|
[t] { return 0; }; // { dg-error "use" }
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
@ -13,5 +13,5 @@ class A // { dg-error "no match" }
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
A a;
|
A a;
|
||||||
A b = a; // { dg-message "required here" }
|
A b = a; // { dg-message "required here|deleted" }
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,41 @@
|
|||||||
|
2010-06-29 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* 19_diagnostics/error_category/cons/copy_neg.cc: Adjust expected
|
||||||
|
errors, use dg-prune-output.
|
||||||
|
* 20_util/function/cmp/cmp_neg.cc: Likewise.
|
||||||
|
* 20_util/unique_ptr/assign/assign_neg.cc: Likewise.
|
||||||
|
* 20_util/unique_ptr/cons/pointer_array_convertible.cc: Likewise.
|
||||||
|
* 20_util/unique_ptr/modifiers/reset_neg.cc: Likewise.
|
||||||
|
* 29_atomics/atomic/cons/assign_neg.cc: Likewise.
|
||||||
|
* 29_atomics/atomic/cons/copy_neg.cc: Likewise.
|
||||||
|
* 29_atomics/atomic_address/cons/assign_neg.cc: Likewise.
|
||||||
|
* 29_atomics/atomic_address/cons/copy_neg.cc: Likewise.
|
||||||
|
* 29_atomics/atomic_flag/cons/assign_neg.cc: Likewise.
|
||||||
|
* 29_atomics/atomic_flag/cons/copy_neg.cc: Likewise.
|
||||||
|
* 29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
|
||||||
|
* 29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
|
||||||
|
* 29_atomics/condition_variable/cons/assign_neg.cc: Likewise.
|
||||||
|
* 30_threads/condition_variable/cons/copy_neg.cc: Likewise.
|
||||||
|
* 30_threads/condition_variable_any/cons/assign_neg.cc: Likewise.
|
||||||
|
* 30_threads/condition_variable_any/cons/copy_neg.cc: Likewise.
|
||||||
|
* 30_threads/future/cons/assign_neg.cc: Likewise.
|
||||||
|
* 30_threads/future/cons/copy_neg.cc: Likewise.
|
||||||
|
* 30_threads/mutex/cons/assign_neg.cc: Likewise.
|
||||||
|
* 30_threads/mutex/cons/copy_neg.cc: Likewise.
|
||||||
|
* 30_threads/packaged_task/cons/assign_neg.cc: Likewise.
|
||||||
|
* 30_threads/packaged_task/cons/copy_neg.cc: Likewise.
|
||||||
|
* 30_threads/promise/cons/assign_neg.cc: Likewise.
|
||||||
|
* 30_threads/promise/cons/copy_neg.cc: Likewise.
|
||||||
|
* 30_threads/recursive_mutex/cons/assign_neg.cc: Likewise.
|
||||||
|
* 30_threads/recursive_mutex/cons/copy_neg.cc: Likewise.
|
||||||
|
* 30_threads/recursive_timed_mutex/cons/assign_neg.cc: Likewise.
|
||||||
|
* 30_threads/recursive_timed_mutex/cons/copy_neg.cc: Likewise.
|
||||||
|
* 30_threads/thread/cons/assign_neg.cc: Likewise.
|
||||||
|
* 30_threads/thread/cons/copy_neg.cc: Likewise.
|
||||||
|
* 30_threads/timed_mutex/cons/assign_neg.cc: Likewise.
|
||||||
|
* 30_threads/timed_mutex/cons/copy_neg.cc: Likewise.
|
||||||
|
* ext/ext_pointer/1_neg.cc: Likewise.
|
||||||
|
|
||||||
2010-06-29 Paolo Carlini <paolo.carlini@oracle.com>
|
2010-06-29 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
PR libstdc++/44708
|
PR libstdc++/44708
|
||||||
|
@ -27,10 +27,10 @@ int main()
|
|||||||
bool test __attribute__((unused)) = true;
|
bool test __attribute__((unused)) = true;
|
||||||
|
|
||||||
__gnu_test::test_category c1;
|
__gnu_test::test_category c1;
|
||||||
__gnu_test::test_category c2(c1); // { dg-error "first required here" }
|
__gnu_test::test_category c2(c1); // { dg-error "deleted" }
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 72 }
|
// { dg-prune-output "testsuite_error" }
|
||||||
// { dg-error "used here" "" { target *-*-* } 30 }
|
// { dg-prune-output "include" }
|
||||||
|
@ -18,15 +18,16 @@
|
|||||||
// with this library; see the file COPYING3. If not see
|
// with this library; see the file COPYING3. If not see
|
||||||
// <http://www.gnu.org/licenses/>.
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
// { dg-prune-output "include" }
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
void test01()
|
void test01()
|
||||||
{
|
{
|
||||||
std::function<void()> f1;
|
std::function<void()> f1;
|
||||||
std::function<void()> f2;
|
std::function<void()> f2;
|
||||||
f1 == f2; // { dg-error "here" }
|
f1 == f2; // { dg-error "deleted" }
|
||||||
f1 != f2; // { dg-error "here" }
|
f1 != f2; // { dg-error "deleted" }
|
||||||
// { dg-excess-errors "" }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
@ -39,25 +39,14 @@ void
|
|||||||
test02()
|
test02()
|
||||||
{
|
{
|
||||||
std::unique_ptr<int[]> p1(new int(420));
|
std::unique_ptr<int[]> p1(new int(420));
|
||||||
std::unique_ptr<int[]> p2 = p1;
|
std::unique_ptr<int[]> p2 = p1; // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
test03()
|
test03()
|
||||||
{
|
{
|
||||||
std::unique_ptr<int[2]> p1(new int[3]);
|
std::unique_ptr<int[2]> p1(new int[3]); // { dg-error "no match" }
|
||||||
std::unique_ptr<int[2]> p2 = p1;
|
std::unique_ptr<int[2]> p2 = p1; // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 373 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "used here" "" { target *-*-* } 42 }
|
|
||||||
// { dg-error "no matching" "" { target *-*-* } 48 }
|
|
||||||
// { dg-warning "note" "" { target *-*-* } 137 }
|
|
||||||
// { dg-warning "note" "" { target *-*-* } 133 }
|
|
||||||
// { dg-warning "note" "" { target *-*-* } 128 }
|
|
||||||
// { dg-warning "note" "" { target *-*-* } 122 }
|
|
||||||
// { dg-warning "note" "" { target *-*-* } 117 }
|
|
||||||
// { dg-warning "note" "" { target *-*-* } 112 }
|
|
||||||
// { dg-warning "note" "" { target *-*-* } 106 }
|
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 225 }
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 49 }
|
|
||||||
|
@ -37,4 +37,5 @@ test01()
|
|||||||
{
|
{
|
||||||
std::unique_ptr<B[]> B_from_A(new A[3]); //{ dg-error "invalid conversion from" }
|
std::unique_ptr<B[]> B_from_A(new A[3]); //{ dg-error "invalid conversion from" }
|
||||||
}
|
}
|
||||||
//{ dg-excess-errors "initialization" }
|
|
||||||
|
// { dg-prune-output "include" }
|
||||||
|
@ -32,8 +32,7 @@ struct B : A
|
|||||||
void test01()
|
void test01()
|
||||||
{
|
{
|
||||||
std::unique_ptr<B[]> up;
|
std::unique_ptr<B[]> up;
|
||||||
up.reset(new A[3]);
|
up.reset(new A[3]); // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 35 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 363 }
|
|
||||||
|
@ -29,4 +29,4 @@ int main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "ambiguous" "" { target *-*-* } 522 }
|
// { dg-error "ambiguous" "" { target *-*-* } 522 }
|
||||||
// { dg-excess-errors "In member function" }
|
// { dg-prune-output "include" }
|
||||||
|
@ -28,19 +28,5 @@ int main()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 561 }
|
// { dg-error "deleted" "" { target *-*-* } 561 }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 229 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 247 }
|
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 265 }
|
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 283 }
|
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 301 }
|
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 319 }
|
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 337 }
|
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 355 }
|
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 373 }
|
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 391 }
|
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 409 }
|
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 427 }
|
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 445 }
|
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 463 }
|
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 481 }
|
|
||||||
|
@ -28,4 +28,4 @@ void test01()
|
|||||||
test_type t2;
|
test_type t2;
|
||||||
t1 = t2; // { dg-error "ambiguous" }
|
t1 = t2; // { dg-error "ambiguous" }
|
||||||
}
|
}
|
||||||
// { dg-excess-errors "deleted function" }
|
// { dg-prune-output "include" }
|
||||||
|
@ -25,7 +25,7 @@ void test01()
|
|||||||
// Copy.
|
// Copy.
|
||||||
typedef std::atomic_address test_type;
|
typedef std::atomic_address test_type;
|
||||||
test_type t1;
|
test_type t1;
|
||||||
test_type t2(t1);
|
test_type t2(t1); // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
// { dg-error "used here" "" { target *-*-* } 28 }
|
|
||||||
// { dg-excess-errors "deleted function" }
|
// { dg-prune-output "include" }
|
||||||
|
@ -26,7 +26,7 @@ void test01()
|
|||||||
typedef std::atomic_flag test_type;
|
typedef std::atomic_flag test_type;
|
||||||
test_type t1;
|
test_type t1;
|
||||||
test_type t2;
|
test_type t2;
|
||||||
t1 = t2;
|
t1 = t2; // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
// { dg-error "used here" "" { target *-*-* } 29 }
|
|
||||||
// { dg-excess-errors "deleted function" }
|
// { dg-prune-output "include" }
|
||||||
|
@ -25,7 +25,7 @@ void test01()
|
|||||||
// Copy.
|
// Copy.
|
||||||
typedef std::atomic_flag test_type;
|
typedef std::atomic_flag test_type;
|
||||||
test_type t1;
|
test_type t1;
|
||||||
test_type t2(t1);
|
test_type t2(t1); // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
// { dg-error "used here" "" { target *-*-* } 28 }
|
|
||||||
// { dg-excess-errors "deleted function" }
|
// { dg-prune-output "include" }
|
||||||
|
@ -30,4 +30,4 @@ int main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "ambiguous" "" { target *-*-* } 522 }
|
// { dg-error "ambiguous" "" { target *-*-* } 522 }
|
||||||
// { dg-excess-errors "In member function" }
|
// { dg-prune-output "include" }
|
||||||
|
@ -29,12 +29,5 @@ int main()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 561 }
|
// { dg-error "deleted" "" { target *-*-* } 561 }
|
||||||
// { dg-excess-errors "deleted function" }
|
// { dg-prune-output "include" }
|
||||||
// { dg-excess-errors "deleted function" }
|
|
||||||
// { dg-error "instantiated from" "" { target *-*-* } 28 }
|
|
||||||
// { dg-error "instantiated from" "" { target *-*-* } 567 }
|
|
||||||
// { dg-error "instantiated from" "" { target *-*-* } 170 }
|
|
||||||
// { dg-error "instantiated from" "" { target *-*-* } 399 }
|
|
||||||
// { dg-error "instantiated from" "" { target *-*-* } 168 }
|
|
||||||
// { dg-excess-errors "In member function" }
|
|
||||||
|
@ -28,8 +28,7 @@ void test01()
|
|||||||
// assign
|
// assign
|
||||||
std::condition_variable c1;
|
std::condition_variable c1;
|
||||||
std::condition_variable c2;
|
std::condition_variable c2;
|
||||||
c1 = c2;
|
c1 = c2; // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 31 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 70 }
|
|
||||||
|
@ -27,8 +27,7 @@ void test01()
|
|||||||
{
|
{
|
||||||
// copy
|
// copy
|
||||||
std::condition_variable c1;
|
std::condition_variable c1;
|
||||||
std::condition_variable c2(c1);
|
std::condition_variable c2(c1); // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 30 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 69 }
|
|
||||||
|
@ -28,8 +28,7 @@ void test01()
|
|||||||
// assign
|
// assign
|
||||||
std::condition_variable_any c1;
|
std::condition_variable_any c1;
|
||||||
std::condition_variable_any c2;
|
std::condition_variable_any c2;
|
||||||
c1 = c2;
|
c1 = c2; // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 31 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 179 }
|
|
||||||
|
@ -27,8 +27,7 @@ void test01()
|
|||||||
{
|
{
|
||||||
// copy
|
// copy
|
||||||
std::condition_variable_any c1;
|
std::condition_variable_any c1;
|
||||||
std::condition_variable_any c2(c1);
|
std::condition_variable_any c2(c1); // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 30 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 178 }
|
|
||||||
|
@ -31,8 +31,7 @@ void test01()
|
|||||||
// assign
|
// assign
|
||||||
std::future<int>& p1 = get();
|
std::future<int>& p1 = get();
|
||||||
std::future<int>& p2 = get();
|
std::future<int>& p2 = get();
|
||||||
p1 = p2;
|
p1 = p2; // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 34 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 581 }
|
|
||||||
|
@ -30,8 +30,7 @@ void test01()
|
|||||||
{
|
{
|
||||||
// copy
|
// copy
|
||||||
std::future<int>& p1 = get();
|
std::future<int>& p1 = get();
|
||||||
std::future<int> p2(p1);
|
std::future<int> p2(p1); // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 33 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 580 }
|
|
||||||
|
@ -29,8 +29,7 @@ void test01()
|
|||||||
typedef std::mutex mutex_type;
|
typedef std::mutex mutex_type;
|
||||||
mutex_type m1;
|
mutex_type m1;
|
||||||
mutex_type m2;
|
mutex_type m2;
|
||||||
m1 = m2;
|
m1 = m2; // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 32 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 82 }
|
|
||||||
|
@ -28,8 +28,7 @@ void test01()
|
|||||||
// assign
|
// assign
|
||||||
typedef std::mutex mutex_type;
|
typedef std::mutex mutex_type;
|
||||||
mutex_type m1;
|
mutex_type m1;
|
||||||
mutex_type m2(m1);
|
mutex_type m2(m1); // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 31 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 81 }
|
|
||||||
|
@ -29,8 +29,7 @@ void test01()
|
|||||||
// assign
|
// assign
|
||||||
std::packaged_task<int()> p1;
|
std::packaged_task<int()> p1;
|
||||||
std::packaged_task<int()> p2;
|
std::packaged_task<int()> p2;
|
||||||
p1 = p2;
|
p1 = p2; // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 32 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 1228 }
|
|
||||||
|
@ -28,8 +28,7 @@ void test01()
|
|||||||
{
|
{
|
||||||
// copy
|
// copy
|
||||||
std::packaged_task<int()> p1;
|
std::packaged_task<int()> p1;
|
||||||
std::packaged_task<int()> p2(p1);
|
std::packaged_task<int()> p2(p1); // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 31 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 1227 }
|
|
||||||
|
@ -29,8 +29,7 @@ void test01()
|
|||||||
// assign
|
// assign
|
||||||
std::promise<int> p1;
|
std::promise<int> p1;
|
||||||
std::promise<int> p2;
|
std::promise<int> p2;
|
||||||
p1 = p2;
|
p1 = p2; // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 32 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 871 }
|
|
||||||
|
@ -28,8 +28,7 @@ void test01()
|
|||||||
{
|
{
|
||||||
// copy
|
// copy
|
||||||
std::promise<int> p1;
|
std::promise<int> p1;
|
||||||
std::promise<int> p2(p1);
|
std::promise<int> p2(p1); // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 31 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 855 }
|
|
||||||
|
@ -29,8 +29,7 @@ void test01()
|
|||||||
typedef std::recursive_mutex mutex_type;
|
typedef std::recursive_mutex mutex_type;
|
||||||
mutex_type m1;
|
mutex_type m1;
|
||||||
mutex_type m2;
|
mutex_type m2;
|
||||||
m1 = m2;
|
m1 = m2; // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 32 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 134 }
|
|
||||||
|
@ -28,8 +28,7 @@ void test01()
|
|||||||
// assign
|
// assign
|
||||||
typedef std::recursive_mutex mutex_type;
|
typedef std::recursive_mutex mutex_type;
|
||||||
mutex_type m1;
|
mutex_type m1;
|
||||||
mutex_type m2(m1);
|
mutex_type m2(m1); // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 31 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 133 }
|
|
||||||
|
@ -29,8 +29,7 @@ void test01()
|
|||||||
typedef std::recursive_timed_mutex mutex_type;
|
typedef std::recursive_timed_mutex mutex_type;
|
||||||
mutex_type m1;
|
mutex_type m1;
|
||||||
mutex_type m2;
|
mutex_type m2;
|
||||||
m1 = m2;
|
m1 = m2; // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 32 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 297 }
|
|
||||||
|
@ -28,8 +28,7 @@ void test01()
|
|||||||
// assign
|
// assign
|
||||||
typedef std::recursive_timed_mutex mutex_type;
|
typedef std::recursive_timed_mutex mutex_type;
|
||||||
mutex_type m1;
|
mutex_type m1;
|
||||||
mutex_type m2(m1);
|
mutex_type m2(m1); // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 31 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 296 }
|
|
||||||
|
@ -28,8 +28,7 @@ void test01()
|
|||||||
typedef std::thread test_type;
|
typedef std::thread test_type;
|
||||||
test_type t1;
|
test_type t1;
|
||||||
test_type t2;
|
test_type t2;
|
||||||
t1 = t2;
|
t1 = t2; // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 31 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 148 }
|
|
||||||
|
@ -27,9 +27,13 @@ void test01()
|
|||||||
// copy
|
// copy
|
||||||
typedef std::thread test_type;
|
typedef std::thread test_type;
|
||||||
test_type t1;
|
test_type t1;
|
||||||
test_type t2(t1); // XXX this is failing for the wrong reason
|
test_type t2(t1); // { dg-error "deleted" "" { xfail *-*-* } }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "here" "" { target *-*-* } 30 }
|
// This is failing for the wrong reason; it should fail because we're
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 126 }
|
// trying to call the deleted copy constructor, but instead it fails
|
||||||
// { dg-excess-errors "In file included from" }
|
// because we try to call the thread(_Callable&&,_Args&&...) constructor
|
||||||
|
// and fail because thread isn't callable. But that's OK for now.
|
||||||
|
// { dg-error "" "" { target *-*-* } 30 }
|
||||||
|
|
||||||
|
// { dg-prune-output "include" }
|
||||||
|
@ -29,8 +29,7 @@ void test01()
|
|||||||
typedef std::timed_mutex mutex_type;
|
typedef std::timed_mutex mutex_type;
|
||||||
mutex_type m1;
|
mutex_type m1;
|
||||||
mutex_type m2;
|
mutex_type m2;
|
||||||
m1 = m2;
|
m1 = m2; // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 32 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 192 }
|
|
||||||
|
@ -28,8 +28,7 @@ void test01()
|
|||||||
// assign
|
// assign
|
||||||
typedef std::timed_mutex mutex_type;
|
typedef std::timed_mutex mutex_type;
|
||||||
mutex_type m1;
|
mutex_type m1;
|
||||||
mutex_type m2(m1);
|
mutex_type m2(m1); // { dg-error "deleted" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "used here" "" { target *-*-* } 31 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "deleted function" "" { target *-*-* } 191 }
|
|
||||||
|
@ -91,8 +91,4 @@ void test01(void) {
|
|||||||
aptr5 = __const_pointer_cast<B_pointer>(cbptr); // ok
|
aptr5 = __const_pointer_cast<B_pointer>(cbptr); // ok
|
||||||
}
|
}
|
||||||
|
|
||||||
// { dg-error "invalid conversion " "" { target *-*-* } 314 }
|
// { dg-prune-output "include" }
|
||||||
// { dg-error "invalid conversion " "" { target *-*-* } 308 }
|
|
||||||
// { dg-error "invalid conversion " "" { target *-*-* } 331 }
|
|
||||||
// { dg-error "invalid conversion " "" { target *-*-* } 339 }
|
|
||||||
// { dg-excess-errors "In constructor" }
|
|
||||||
|
Loading…
Reference in New Issue
Block a user