Commit f0bbed44 by Paolo Carlini Committed by Paolo Carlini

default.cc: Avoid -Wall warnings.

2008-06-25  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/29_atomics/atomic_flag/cons/default.cc: Avoid -Wall
	warnings.
	* testsuite/29_atomics/atomic_flag/cons/aggregate.cc: Likewise.
	* testsuite/29_atomics/headers/cstdatomic/types_std_c++0x.cc:
	Likewise.
	* testsuite/29_atomics/headers/stdatomic.h/types.c: Likewise.
	* testsuite/util/testsuite_common_types.h (struct assignable,
	struct default_constructible, struct copy_constructible,
	struct explicit_value_constructible): Use a tad of simulated
	concept checking techniques to avoid spurious warnings.
	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error
	markers.
	* testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.

From-SVN: r137127
parent 2ffb6613
2008-06-25 Paolo Carlini <paolo.carlini@oracle.com> 2008-06-25 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/29_atomics/atomic_flag/cons/default.cc: Avoid -Wall
warnings.
* testsuite/29_atomics/atomic_flag/cons/aggregate.cc: Likewise.
* testsuite/29_atomics/headers/cstdatomic/types_std_c++0x.cc:
Likewise.
* testsuite/29_atomics/headers/stdatomic.h/types.c: Likewise.
* testsuite/util/testsuite_common_types.h (struct assignable,
struct default_constructible, struct copy_constructible,
struct explicit_value_constructible): Use a tad of simulated
concept checking techniques to avoid spurious warnings.
* testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error
markers.
* testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
2008-06-25 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/stl_algo.h (__find_if_not, find_if_not, all_of, * include/bits/stl_algo.h (__find_if_not, find_if_not, all_of,
any_of, none_of): Add in C++0x, per N2666. any_of, none_of): Add in C++0x, per N2666.
* include/bits/algorithmfwd.h: Update. * include/bits/algorithmfwd.h: Update.
......
...@@ -38,8 +38,8 @@ int main() ...@@ -38,8 +38,8 @@ int main()
return 0; return 0;
} }
// { dg-error "within this context" "" { target *-*-* } 309 } // { dg-error "within this context" "" { target *-*-* } 310 }
// { dg-error "is private" "" { target *-*-* } 1750 } // { dg-error "is private" "" { target *-*-* } 1750 }
// { dg-error "is private" "" { target *-*-* } 1782 } // { dg-error "is private" "" { target *-*-* } 1782 }
// { dg-error "is private" "" { target *-*-* } 1799 } // { dg-error "is private" "" { target *-*-* } 1799 }
// { dg-error "is private" "" { target *-*-* } 1816 } // { dg-error "is private" "" { target *-*-* } 1816 }
......
...@@ -38,9 +38,9 @@ int main() ...@@ -38,9 +38,9 @@ int main()
return 0; return 0;
} }
// { dg-error "within this context" "" { target *-*-* } 332 } // { dg-error "within this context" "" { target *-*-* } 349 }
// { dg-error "is private" "" { target *-*-* } 1749 } // { dg-error "is private" "" { target *-*-* } 1749 }
// { dg-error "is private" "" { target *-*-* } 1781 } // { dg-error "is private" "" { target *-*-* } 1781 }
// { dg-error "is private" "" { target *-*-* } 1798 } // { dg-error "is private" "" { target *-*-* } 1798 }
// { dg-error "is private" "" { target *-*-* } 1814 } // { dg-error "is private" "" { target *-*-* } 1814 }
// { dg-error "is private" "" { target *-*-* } 1831 } // { dg-error "is private" "" { target *-*-* } 1831 }
......
...@@ -33,6 +33,6 @@ ...@@ -33,6 +33,6 @@
int main() int main()
{ {
// Only safe usage. // Only safe usage.
std::atomic_flag guard = ATOMIC_FLAG_INIT; std::atomic_flag guard __attribute__((unused)) = ATOMIC_FLAG_INIT;
return 0; return 0;
} }
...@@ -32,6 +32,6 @@ ...@@ -32,6 +32,6 @@
int main() int main()
{ {
// Default constructor. // Default constructor.
std::atomic_flag a; std::atomic_flag a __attribute__((unused));
return 0; return 0;
} }
...@@ -76,5 +76,6 @@ void test01() ...@@ -76,5 +76,6 @@ void test01()
using std::atomic_address; using std::atomic_address;
&std::atomic_global_fence_compatibility; const std::atomic_flag* p __attribute__((unused))
= &std::atomic_global_fence_compatibility;
} }
...@@ -24,11 +24,11 @@ ...@@ -24,11 +24,11 @@
void test01() void test01()
{ {
typedef memory_order t_01; typedef memory_order t_01;
memory_order t_02 = memory_order_relaxed; memory_order t_02 __attribute__((unused)) = memory_order_relaxed;
memory_order t_03 = memory_order_acquire; memory_order t_03 __attribute__((unused)) = memory_order_acquire;
memory_order t_04 = memory_order_release; memory_order t_04 __attribute__((unused)) = memory_order_release;
memory_order t_05 = memory_order_acq_rel; memory_order t_05 __attribute__((unused)) = memory_order_acq_rel;
memory_order t_06 = memory_order_seq_cst; memory_order t_06 __attribute__((unused)) = memory_order_seq_cst;
typedef atomic_flag t_07; typedef atomic_flag t_07;
...@@ -76,5 +76,6 @@ void test01() ...@@ -76,5 +76,6 @@ void test01()
typedef atomic_address t_46; typedef atomic_address t_46;
&atomic_global_fence_compatibility; const atomic_flag* p __attribute__((unused))
= &atomic_global_fence_compatibility;
} }
...@@ -300,36 +300,59 @@ namespace __gnu_test ...@@ -300,36 +300,59 @@ namespace __gnu_test
// Generator to test assignment operator. // Generator to test assignment operator.
struct assignable struct assignable
{ {
template<typename _T> template<typename _Tp>
void void
operator()() operator()()
{ {
_T v1; struct _Concept
_T v2; {
v1 = v2; void __constraint()
{ __v1 = __v2; }
_Tp __v1;
_Tp __v2;
};
void (_Concept::*__x)() __attribute__((unused))
= &_Concept::__constraint;
} }
}; };
// Generator to test default constructor. // Generator to test default constructor.
struct default_constructible struct default_constructible
{ {
template<typename _T> template<typename _Tp>
void void
operator()() operator()()
{ {
_T v; struct _Concept
{
void __constraint()
{ _Tp __v; }
};
void (_Concept::*__x)() __attribute__((unused))
= &_Concept::__constraint;
} }
}; };
// Generator to test copy constructor. // Generator to test copy constructor.
struct copy_constructible struct copy_constructible
{ {
template<typename _T> template<typename _Tp>
void void
operator()() operator()()
{ {
_T v1; struct _Concept
_T v2(v1); {
void __constraint()
{ _Tp __v2(__v1); }
_Tp __v1;
};
void (_Concept::*__x)() __attribute__((unused))
= &_Concept::__constraint;
} }
}; };
...@@ -340,8 +363,16 @@ namespace __gnu_test ...@@ -340,8 +363,16 @@ namespace __gnu_test
void void
operator()() operator()()
{ {
_Tvalue a; struct _Concept
_Ttype v(a); {
void __constraint()
{ _Ttype __v(__a); }
_Tvalue __a;
};
void (_Concept::*__x)() __attribute__((unused))
= &_Concept::__constraint;
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment