aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/29_atomics
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2008-06-25 23:28:14 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2008-06-25 23:28:14 +0000
commitf0bbed4417c151731640d018d77aca2426688174 (patch)
treea6304b6bef398a9f05e637132c9238757a430a44 /libstdc++-v3/testsuite/29_atomics
parent2ffb6613b1f4c2dde6dc1f3ed5cddc27d84df841 (diff)
downloadgcc-f0bbed4417c151731640d018d77aca2426688174.zip
gcc-f0bbed4417c151731640d018d77aca2426688174.tar.gz
gcc-f0bbed4417c151731640d018d77aca2426688174.tar.bz2
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
Diffstat (limited to 'libstdc++-v3/testsuite/29_atomics')
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc6
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/aggregate.cc2
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/default.cc2
-rw-r--r--libstdc++-v3/testsuite/29_atomics/headers/cstdatomic/types_std_c++0x.cc3
-rw-r--r--libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/types.c13
6 files changed, 16 insertions, 14 deletions
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
index a22a558..2ad480a 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
@@ -38,8 +38,8 @@ int main()
return 0;
}
-// { dg-error "within this context" "" { target *-*-* } 309 }
-// { dg-error "is private" "" { target *-*-* } 1750 }
+// { dg-error "within this context" "" { target *-*-* } 310 }
+// { dg-error "is private" "" { target *-*-* } 1750 }
// { dg-error "is private" "" { target *-*-* } 1782 }
// { dg-error "is private" "" { target *-*-* } 1799 }
// { dg-error "is private" "" { target *-*-* } 1816 }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
index 4912518..a78177e 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
@@ -38,9 +38,9 @@ int main()
return 0;
}
-// { dg-error "within this context" "" { target *-*-* } 332 }
-// { dg-error "is private" "" { target *-*-* } 1749 }
-// { dg-error "is private" "" { target *-*-* } 1781 }
+// { dg-error "within this context" "" { target *-*-* } 349 }
+// { dg-error "is private" "" { target *-*-* } 1749 }
+// { dg-error "is private" "" { target *-*-* } 1781 }
// { dg-error "is private" "" { target *-*-* } 1798 }
// { dg-error "is private" "" { target *-*-* } 1814 }
// { dg-error "is private" "" { target *-*-* } 1831 }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/aggregate.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/aggregate.cc
index 151d85f..e7a046f 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/aggregate.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/aggregate.cc
@@ -33,6 +33,6 @@
int main()
{
// Only safe usage.
- std::atomic_flag guard = ATOMIC_FLAG_INIT;
+ std::atomic_flag guard __attribute__((unused)) = ATOMIC_FLAG_INIT;
return 0;
}
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/default.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/default.cc
index b4fa3a7..591a3f2 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/default.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/default.cc
@@ -32,6 +32,6 @@
int main()
{
// Default constructor.
- std::atomic_flag a;
+ std::atomic_flag a __attribute__((unused));
return 0;
}
diff --git a/libstdc++-v3/testsuite/29_atomics/headers/cstdatomic/types_std_c++0x.cc b/libstdc++-v3/testsuite/29_atomics/headers/cstdatomic/types_std_c++0x.cc
index 31b32c1..9a3ab5e 100644
--- a/libstdc++-v3/testsuite/29_atomics/headers/cstdatomic/types_std_c++0x.cc
+++ b/libstdc++-v3/testsuite/29_atomics/headers/cstdatomic/types_std_c++0x.cc
@@ -76,5 +76,6 @@ void test01()
using std::atomic_address;
- &std::atomic_global_fence_compatibility;
+ const std::atomic_flag* p __attribute__((unused))
+ = &std::atomic_global_fence_compatibility;
}
diff --git a/libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/types.c b/libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/types.c
index 8e9cfd5..88bc740 100644
--- a/libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/types.c
+++ b/libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/types.c
@@ -24,11 +24,11 @@
void test01()
{
typedef memory_order t_01;
- memory_order t_02 = memory_order_relaxed;
- memory_order t_03 = memory_order_acquire;
- memory_order t_04 = memory_order_release;
- memory_order t_05 = memory_order_acq_rel;
- memory_order t_06 = memory_order_seq_cst;
+ memory_order t_02 __attribute__((unused)) = memory_order_relaxed;
+ memory_order t_03 __attribute__((unused)) = memory_order_acquire;
+ memory_order t_04 __attribute__((unused)) = memory_order_release;
+ memory_order t_05 __attribute__((unused)) = memory_order_acq_rel;
+ memory_order t_06 __attribute__((unused)) = memory_order_seq_cst;
typedef atomic_flag t_07;
@@ -76,5 +76,6 @@ void test01()
typedef atomic_address t_46;
- &atomic_global_fence_compatibility;
+ const atomic_flag* p __attribute__((unused))
+ = &atomic_global_fence_compatibility;
}