aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2010-11-02 18:25:55 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2010-11-02 18:25:55 +0000
commita9992f7f6b00e697f46913fdf809366522118b6b (patch)
treec567f332ba859694781753c90bac55a5ab87b548 /libstdc++-v3
parent21736ec2f7bec064bdc87f81bb3e2e2f5bdf90c9 (diff)
downloadgcc-a9992f7f6b00e697f46913fdf809366522118b6b.zip
gcc-a9992f7f6b00e697f46913fdf809366522118b6b.tar.gz
gcc-a9992f7f6b00e697f46913fdf809366522118b6b.tar.bz2
syntax_option_type.cc: Avoid -Wall warnings.
2010-11-02 Paolo Carlini <paolo.carlini@oracle.com * testsuite/28_regex/05_constants/syntax_option_type.cc: Avoid -Wall warnings. * testsuite/28_regex/08_basic_regex/requirements/constexpr_data.cc: Likewise. * testsuite/18_support/numeric_limits/requirements/ constexpr_functions.cc: Likewise. * testsuite/18_support/numeric_limits/requirements/ constexpr_data.cc: Likewise. * testsuite/21_strings/char_traits/requirements/ constexpr_functions.cc: Likewise. * testsuite/26_numerics/random/independent_bits_engine/requirements/ constexpr_functions.cc: Likewise. * testsuite/26_numerics/random/subtract_with_carry_engine/ requirements/constexpr_functions.cc: Likewise. * testsuite/26_numerics/random/subtract_with_carry_engine/ requirements/constexpr_data.cc: Likewise. * testsuite/26_numerics/random/discard_block_engine/requirements/ constexpr_functions.cc: Likewise. * testsuite/26_numerics/random/discard_block_engine/requirements/ constexpr_data.cc: Likewise. * testsuite/26_numerics/random/mersenne_twister_engine/ requirements/constexpr_functions.cc: Likewise. * testsuite/26_numerics/random/mersenne_twister_engine/ requirements/constexpr_data.cc: Likewise. * testsuite/26_numerics/random/linear_congruential_engine/ requirements/constexpr_functions.cc: Likewise. * testsuite/26_numerics/random/linear_congruential_engine/ requirements/constexpr_data.cc: Likewise. * testsuite/26_numerics/random/shuffle_order_engine/ requirements/constexpr_functions.cc: Likewise. * testsuite/26_numerics/random/shuffle_order_engine/ requirements/constexpr_data.cc: Likewise. * testsuite/26_numerics/complex/requirements/ constexpr_functions.cc: Likewise. * testsuite/23_containers/bitset/requirements/ constexpr_functions.cc: Likewise. * testsuite/23_containers/array/requirements/ constexpr_functions.cc: Likewise. * testsuite/util/testsuite_common_types.h: Likewise. * testsuite/20_util/duration/requirements/ constexpr_functions.cc: Likewise. * testsuite/20_util/duration_cast/constexpr.cc: Likewise. * testsuite/20_util/time_point/requirements/ constexpr_functions.cc: Likewise. * testsuite/20_util/ratio/requirements/constexpr_data.cc: Likewise. * testsuite/tr1/4_metaprogramming/integral_constant/ requirements/constexpr_data.cc: Remove. From-SVN: r166210
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog51
-rw-r--r--libstdc++-v3/testsuite/18_support/numeric_limits/requirements/constexpr_data.cc69
-rw-r--r--libstdc++-v3/testsuite/18_support/numeric_limits/requirements/constexpr_functions.cc27
-rw-r--r--libstdc++-v3/testsuite/20_util/duration/requirements/constexpr_functions.cc18
-rw-r--r--libstdc++-v3/testsuite/20_util/duration_cast/constexpr.cc4
-rw-r--r--libstdc++-v3/testsuite/20_util/ratio/requirements/constexpr_data.cc6
-rw-r--r--libstdc++-v3/testsuite/20_util/time_point/requirements/constexpr_functions.cc9
-rw-r--r--libstdc++-v3/testsuite/21_strings/char_traits/requirements/constexpr_functions.cc21
-rw-r--r--libstdc++-v3/testsuite/23_containers/array/requirements/constexpr_functions.cc6
-rw-r--r--libstdc++-v3/testsuite/23_containers/bitset/requirements/constexpr_functions.cc2
-rw-r--r--libstdc++-v3/testsuite/26_numerics/complex/requirements/constexpr_functions.cc4
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/discard_block_engine/requirements/constexpr_data.cc6
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/discard_block_engine/requirements/constexpr_functions.cc6
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/requirements/constexpr_functions.cc6
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/requirements/constexpr_data.cc12
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/requirements/constexpr_functions.cc6
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/requirements/constexpr_data.cc42
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/requirements/constexpr_functions.cc6
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/requirements/constexpr_data.cc3
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/requirements/constexpr_functions.cc6
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/requirements/constexpr_data.cc12
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/requirements/constexpr_functions.cc6
-rw-r--r--libstdc++-v3/testsuite/28_regex/05_constants/syntax_option_type.cc7
-rw-r--r--libstdc++-v3/testsuite/28_regex/08_basic_regex/requirements/constexpr_data.cc30
-rw-r--r--libstdc++-v3/testsuite/tr1/4_metaprogramming/integral_constant/requirements/constexpr_data.cc52
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_common_types.h10
26 files changed, 262 insertions, 165 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 7de6bce..4fb6895 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,54 @@
+2010-11-02 Paolo Carlini <paolo.carlini@oracle.com
+
+ * testsuite/28_regex/05_constants/syntax_option_type.cc: Avoid
+ -Wall warnings.
+ * testsuite/28_regex/08_basic_regex/requirements/constexpr_data.cc:
+ Likewise.
+ * testsuite/18_support/numeric_limits/requirements/
+ constexpr_functions.cc: Likewise.
+ * testsuite/18_support/numeric_limits/requirements/
+ constexpr_data.cc: Likewise.
+ * testsuite/21_strings/char_traits/requirements/
+ constexpr_functions.cc: Likewise.
+ * testsuite/26_numerics/random/independent_bits_engine/requirements/
+ constexpr_functions.cc: Likewise.
+ * testsuite/26_numerics/random/subtract_with_carry_engine/
+ requirements/constexpr_functions.cc: Likewise.
+ * testsuite/26_numerics/random/subtract_with_carry_engine/
+ requirements/constexpr_data.cc: Likewise.
+ * testsuite/26_numerics/random/discard_block_engine/requirements/
+ constexpr_functions.cc: Likewise.
+ * testsuite/26_numerics/random/discard_block_engine/requirements/
+ constexpr_data.cc: Likewise.
+ * testsuite/26_numerics/random/mersenne_twister_engine/
+ requirements/constexpr_functions.cc: Likewise.
+ * testsuite/26_numerics/random/mersenne_twister_engine/
+ requirements/constexpr_data.cc: Likewise.
+ * testsuite/26_numerics/random/linear_congruential_engine/
+ requirements/constexpr_functions.cc: Likewise.
+ * testsuite/26_numerics/random/linear_congruential_engine/
+ requirements/constexpr_data.cc: Likewise.
+ * testsuite/26_numerics/random/shuffle_order_engine/
+ requirements/constexpr_functions.cc: Likewise.
+ * testsuite/26_numerics/random/shuffle_order_engine/
+ requirements/constexpr_data.cc: Likewise.
+ * testsuite/26_numerics/complex/requirements/
+ constexpr_functions.cc: Likewise.
+ * testsuite/23_containers/bitset/requirements/
+ constexpr_functions.cc: Likewise.
+ * testsuite/23_containers/array/requirements/
+ constexpr_functions.cc: Likewise.
+ * testsuite/util/testsuite_common_types.h: Likewise.
+ * testsuite/20_util/duration/requirements/
+ constexpr_functions.cc: Likewise.
+ * testsuite/20_util/duration_cast/constexpr.cc: Likewise.
+ * testsuite/20_util/time_point/requirements/
+ constexpr_functions.cc: Likewise.
+ * testsuite/20_util/ratio/requirements/constexpr_data.cc: Likewise.
+
+ * testsuite/tr1/4_metaprogramming/integral_constant/
+ requirements/constexpr_data.cc: Remove.
+
2010-11-02 Jason Merrill <jason@redhat.com>
* include/bits/atomic_0.h (_ATOMIC_CMPEXCHNG_): Use C-style cast.
diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/requirements/constexpr_data.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/requirements/constexpr_data.cc
index d5f3b3f..0b82a75 100644
--- a/libstdc++-v3/testsuite/18_support/numeric_limits/requirements/constexpr_data.cc
+++ b/libstdc++-v3/testsuite/18_support/numeric_limits/requirements/constexpr_data.cc
@@ -35,29 +35,52 @@ namespace __gnu_test
{
using std::float_denorm_style;
using std::float_round_style;
- constexpr bool v1(_Ttesttype::is_specialized);
- constexpr int v2(_Ttesttype::digits);
- constexpr int v3(_Ttesttype::digits10);
- constexpr int v4(_Ttesttype::max_digits10);
- constexpr bool v5(_Ttesttype::is_signed);
- constexpr bool v6(_Ttesttype::is_integer);
- constexpr bool v7(_Ttesttype::is_exact);
- constexpr int v8(_Ttesttype::radix);
- constexpr int v9(_Ttesttype::min_exponent);
- constexpr int v10(_Ttesttype::min_exponent10);
- constexpr int v11(_Ttesttype::max_exponent);
- constexpr int v12(_Ttesttype::max_exponent10);
- constexpr bool v13(_Ttesttype::has_infinity);
- constexpr bool v14(_Ttesttype::has_quiet_NaN);
- constexpr bool v15(_Ttesttype::has_signaling_NaN);
- constexpr float_denorm_style v16(_Ttesttype::has_denorm);
- constexpr bool v17(_Ttesttype::has_denorm_loss);
- constexpr bool v18(_Ttesttype::is_iec559);
- constexpr bool v19(_Ttesttype::is_bounded);
- constexpr bool v20(_Ttesttype::is_modulo);
- constexpr bool v21(_Ttesttype::traps);
- constexpr bool v22(_Ttesttype::tinyness_before);
- constexpr float_round_style v23(_Ttesttype::round_style);
+ constexpr bool v1 __attribute__((unused))
+ = _Ttesttype::is_specialized;
+ constexpr int v2 __attribute__((unused))
+ = _Ttesttype::digits;
+ constexpr int v3 __attribute__((unused))
+ = _Ttesttype::digits10;
+ constexpr int v4 __attribute__((unused))
+ = _Ttesttype::max_digits10;
+ constexpr bool v5 __attribute__((unused))
+ = _Ttesttype::is_signed;
+ constexpr bool v6 __attribute__((unused))
+ = _Ttesttype::is_integer;
+ constexpr bool v7 __attribute__((unused))
+ = _Ttesttype::is_exact;
+ constexpr int v8 __attribute__((unused))
+ = _Ttesttype::radix;
+ constexpr int v9 __attribute__((unused))
+ = _Ttesttype::min_exponent;
+ constexpr int v10 __attribute__((unused))
+ = _Ttesttype::min_exponent10;
+ constexpr int v11 __attribute__((unused))
+ = _Ttesttype::max_exponent;
+ constexpr int v12 __attribute__((unused))
+ = _Ttesttype::max_exponent10;
+ constexpr bool v13 __attribute__((unused))
+ = _Ttesttype::has_infinity;
+ constexpr bool v14 __attribute__((unused))
+ = _Ttesttype::has_quiet_NaN;
+ constexpr bool v15 __attribute__((unused))
+ = _Ttesttype::has_signaling_NaN;
+ constexpr float_denorm_style v16 __attribute__((unused))
+ = _Ttesttype::has_denorm;
+ constexpr bool v17 __attribute__((unused))
+ = _Ttesttype::has_denorm_loss;
+ constexpr bool v18 __attribute__((unused))
+ = _Ttesttype::is_iec559;
+ constexpr bool v19 __attribute__((unused))
+ = _Ttesttype::is_bounded;
+ constexpr bool v20 __attribute__((unused))
+ = _Ttesttype::is_modulo;
+ constexpr bool v21 __attribute__((unused))
+ = _Ttesttype::traps;
+ constexpr bool v22 __attribute__((unused))
+ = _Ttesttype::tinyness_before;
+ constexpr float_round_style v23 __attribute__((unused))
+ = _Ttesttype::round_style;
}
};
diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/requirements/constexpr_functions.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/requirements/constexpr_functions.cc
index 7c4852b..f1848f2 100644
--- a/libstdc++-v3/testsuite/18_support/numeric_limits/requirements/constexpr_functions.cc
+++ b/libstdc++-v3/testsuite/18_support/numeric_limits/requirements/constexpr_functions.cc
@@ -33,15 +33,24 @@ namespace __gnu_test
{
void __constraint()
{
- constexpr _Tbasetype v1(_Ttesttype::min());
- constexpr _Tbasetype v2(_Ttesttype::max());
- constexpr _Tbasetype v3(_Ttesttype::lowest());
- constexpr _Tbasetype v4(_Ttesttype::epsilon());
- constexpr _Tbasetype v5(_Ttesttype::round_error());
- constexpr _Tbasetype v6(_Ttesttype::infinity());
- constexpr _Tbasetype v7(_Ttesttype::quiet_NaN());
- constexpr _Tbasetype v8(_Ttesttype::signaling_NaN());
- constexpr _Tbasetype v9(_Ttesttype::denorm_min());
+ constexpr _Tbasetype v1 __attribute__((unused))
+ = _Ttesttype::min();
+ constexpr _Tbasetype v2 __attribute__((unused))
+ = _Ttesttype::max();
+ constexpr _Tbasetype v3 __attribute__((unused))
+ = _Ttesttype::lowest();
+ constexpr _Tbasetype v4 __attribute__((unused))
+ = _Ttesttype::epsilon();
+ constexpr _Tbasetype v5 __attribute__((unused))
+ = _Ttesttype::round_error();
+ constexpr _Tbasetype v6 __attribute__((unused))
+ = _Ttesttype::infinity();
+ constexpr _Tbasetype v7 __attribute__((unused))
+ = _Ttesttype::quiet_NaN();
+ constexpr _Tbasetype v8 __attribute__((unused))
+ = _Ttesttype::signaling_NaN();
+ constexpr _Tbasetype v9 __attribute__((unused))
+ = _Ttesttype::denorm_min();
}
};
diff --git a/libstdc++-v3/testsuite/20_util/duration/requirements/constexpr_functions.cc b/libstdc++-v3/testsuite/20_util/duration/requirements/constexpr_functions.cc
index 3986659..faeab3b 100644
--- a/libstdc++-v3/testsuite/20_util/duration/requirements/constexpr_functions.cc
+++ b/libstdc++-v3/testsuite/20_util/duration/requirements/constexpr_functions.cc
@@ -33,14 +33,20 @@ namespace __gnu_test
{
void __constraint()
{
- constexpr auto v1(_Ttesttype::min());
- constexpr auto v2(_Ttesttype::max());
- constexpr auto v3(_Ttesttype::zero());
+ constexpr auto v1 __attribute__((unused))
+ = _Ttesttype::min();
+ constexpr auto v2 __attribute__((unused))
+ = _Ttesttype::max();
+ constexpr auto v3 __attribute__((unused))
+ = _Ttesttype::zero();
constexpr _Ttesttype obj { };
- constexpr auto v4 = obj.count();
- constexpr auto v5 = -obj;
- constexpr auto v6 = +obj;
+ constexpr auto v4 __attribute__((unused))
+ = obj.count();
+ constexpr auto v5 __attribute__((unused))
+ = -obj;
+ constexpr auto v6 __attribute__((unused))
+ = +obj;
}
};
diff --git a/libstdc++-v3/testsuite/20_util/duration_cast/constexpr.cc b/libstdc++-v3/testsuite/20_util/duration_cast/constexpr.cc
index a68aed6..b8a89ae 100644
--- a/libstdc++-v3/testsuite/20_util/duration_cast/constexpr.cc
+++ b/libstdc++-v3/testsuite/20_util/duration_cast/constexpr.cc
@@ -27,11 +27,11 @@ int main()
// non-constexpr
minutes mn1(6000);
- hours hr1 = duration_cast<hours>(mn1);
+ hours hr1 __attribute__((unused)) = duration_cast<hours>(mn1);
// constexpr
constexpr minutes mn2(6000);
- constexpr hours hr2 = duration_cast<hours>(mn2);
+ constexpr hours hr2 __attribute__((unused)) = duration_cast<hours>(mn2);
return 0;
}
diff --git a/libstdc++-v3/testsuite/20_util/ratio/requirements/constexpr_data.cc b/libstdc++-v3/testsuite/20_util/ratio/requirements/constexpr_data.cc
index bc90adc..2665a81 100644
--- a/libstdc++-v3/testsuite/20_util/ratio/requirements/constexpr_data.cc
+++ b/libstdc++-v3/testsuite/20_util/ratio/requirements/constexpr_data.cc
@@ -33,8 +33,10 @@ namespace __gnu_test
{
void __constraint()
{
- constexpr intmax_t v1(_Ttesttype::num);
- constexpr intmax_t v2(_Ttesttype::den);
+ constexpr intmax_t v1 __attribute__((unused))
+ = _Ttesttype::num;
+ constexpr intmax_t v2 __attribute__((unused))
+ = _Ttesttype::den;
}
};
diff --git a/libstdc++-v3/testsuite/20_util/time_point/requirements/constexpr_functions.cc b/libstdc++-v3/testsuite/20_util/time_point/requirements/constexpr_functions.cc
index feb77fb..2beccd4 100644
--- a/libstdc++-v3/testsuite/20_util/time_point/requirements/constexpr_functions.cc
+++ b/libstdc++-v3/testsuite/20_util/time_point/requirements/constexpr_functions.cc
@@ -33,11 +33,14 @@ namespace __gnu_test
{
void __constraint()
{
- constexpr auto v1(_Ttesttype::min());
- constexpr auto v2(_Ttesttype::max());
+ constexpr auto v1 __attribute__((unused))
+ = _Ttesttype::min();
+ constexpr auto v2 __attribute__((unused))
+ = _Ttesttype::max();
constexpr _Ttesttype obj;
- constexpr auto v3 = obj.time_since_epoch();
+ constexpr auto v3 __attribute__((unused))
+ = obj.time_since_epoch();
}
};
diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/constexpr_functions.cc b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/constexpr_functions.cc
index ecb9a3e..df6c52d 100644
--- a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/constexpr_functions.cc
+++ b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/constexpr_functions.cc
@@ -38,13 +38,20 @@ namespace __gnu_test
const char_type c1(0);
const char_type c2 = c1;
const int_type i(0);
- constexpr auto v1(_Ttesttype::eq(c1, c2));
- constexpr auto v2(_Ttesttype::lt(c1, c2));
- constexpr auto v3(_Ttesttype::to_char_type(i));
- constexpr auto v4(_Ttesttype::to_int_type(c1));
- constexpr auto v5(_Ttesttype::eq_int_type(i, i));
- constexpr auto v6(_Ttesttype::eof());
- constexpr auto v7(_Ttesttype::not_eof(i));
+ constexpr auto v1 __attribute__((unused))
+ = _Ttesttype::eq(c1, c2);
+ constexpr auto v2 __attribute__((unused))
+ = _Ttesttype::lt(c1, c2);
+ constexpr auto v3 __attribute__((unused))
+ = _Ttesttype::to_char_type(i);
+ constexpr auto v4 __attribute__((unused))
+ = _Ttesttype::to_int_type(c1);
+ constexpr auto v5 __attribute__((unused))
+ = _Ttesttype::eq_int_type(i, i);
+ constexpr auto v6 __attribute__((unused))
+ = _Ttesttype::eof();
+ constexpr auto v7 __attribute__((unused))
+ = _Ttesttype::not_eof(i);
}
};
diff --git a/libstdc++-v3/testsuite/23_containers/array/requirements/constexpr_functions.cc b/libstdc++-v3/testsuite/23_containers/array/requirements/constexpr_functions.cc
index 494a8de..ef8c5aa 100644
--- a/libstdc++-v3/testsuite/23_containers/array/requirements/constexpr_functions.cc
+++ b/libstdc++-v3/testsuite/23_containers/array/requirements/constexpr_functions.cc
@@ -34,9 +34,9 @@ namespace __gnu_test
void __constraint()
{
constexpr _Ttesttype a = { };
- constexpr auto v1 = a.size();
- constexpr auto v2 = a.max_size();
- constexpr auto v3 = a.empty();
+ constexpr auto v1 __attribute__((unused)) = a.size();
+ constexpr auto v2 __attribute__((unused)) = a.max_size();
+ constexpr auto v3 __attribute__((unused)) = a.empty();
}
};
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/requirements/constexpr_functions.cc b/libstdc++-v3/testsuite/23_containers/bitset/requirements/constexpr_functions.cc
index ac9a07f..d5b8b47 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/requirements/constexpr_functions.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/requirements/constexpr_functions.cc
@@ -34,7 +34,7 @@ namespace __gnu_test
void __constraint()
{
constexpr _Ttesttype obj;
- constexpr auto v1 = obj.size();
+ constexpr auto v1 __attribute__((unused)) = obj.size();
// constexpr auto v2 = obj[4];
}
};
diff --git a/libstdc++-v3/testsuite/26_numerics/complex/requirements/constexpr_functions.cc b/libstdc++-v3/testsuite/26_numerics/complex/requirements/constexpr_functions.cc
index 74f7bf5..eae5ee7 100644
--- a/libstdc++-v3/testsuite/26_numerics/complex/requirements/constexpr_functions.cc
+++ b/libstdc++-v3/testsuite/26_numerics/complex/requirements/constexpr_functions.cc
@@ -36,8 +36,8 @@ namespace __gnu_test
typedef typename _Ttesttype::_ComplexT _ComplexT;
const _ComplexT cc = { 1.1 };
constexpr _Ttesttype a(cc);
- constexpr auto v1 = a.real();
- constexpr auto v2 = a.imag();
+ constexpr auto v1 __attribute__((unused)) = a.real();
+ constexpr auto v2 __attribute__((unused)) = a.imag();
}
};
diff --git a/libstdc++-v3/testsuite/26_numerics/random/discard_block_engine/requirements/constexpr_data.cc b/libstdc++-v3/testsuite/26_numerics/random/discard_block_engine/requirements/constexpr_data.cc
index 7f82bfe..1c70881 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/discard_block_engine/requirements/constexpr_data.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/discard_block_engine/requirements/constexpr_data.cc
@@ -33,8 +33,10 @@ namespace __gnu_test
{
void __constraint()
{
- constexpr auto v1(_Ttesttype::block_size);
- constexpr auto v2(_Ttesttype::used_block);
+ constexpr auto v1 __attribute__((unused))
+ = _Ttesttype::block_size;
+ constexpr auto v2 __attribute__((unused))
+ = _Ttesttype::used_block;
}
};
diff --git a/libstdc++-v3/testsuite/26_numerics/random/discard_block_engine/requirements/constexpr_functions.cc b/libstdc++-v3/testsuite/26_numerics/random/discard_block_engine/requirements/constexpr_functions.cc
index faec5bf..77f4fb578 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/discard_block_engine/requirements/constexpr_functions.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/discard_block_engine/requirements/constexpr_functions.cc
@@ -33,8 +33,10 @@ namespace __gnu_test
{
void __constraint()
{
- constexpr auto v1(_Ttesttype::min());
- constexpr auto v2(_Ttesttype::max());
+ constexpr auto v1 __attribute__((unused))
+ = _Ttesttype::min();
+ constexpr auto v2 __attribute__((unused))
+ = _Ttesttype::max();
}
};
diff --git a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/requirements/constexpr_functions.cc b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/requirements/constexpr_functions.cc
index 2b84ec8..b10d36f 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/requirements/constexpr_functions.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/requirements/constexpr_functions.cc
@@ -33,8 +33,10 @@ namespace __gnu_test
{
void __constraint()
{
- constexpr auto v1(_Ttesttype::min());
- constexpr auto v2(_Ttesttype::max());
+ constexpr auto v1 __attribute__((unused))
+ = _Ttesttype::min();
+ constexpr auto v2 __attribute__((unused))
+ = _Ttesttype::max();
}
};
diff --git a/libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/requirements/constexpr_data.cc b/libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/requirements/constexpr_data.cc
index e7e9fc0..1e8171b 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/requirements/constexpr_data.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/requirements/constexpr_data.cc
@@ -33,10 +33,14 @@ namespace __gnu_test
{
void __constraint()
{
- constexpr auto v1(_Ttesttype::multiplier);
- constexpr auto v2(_Ttesttype::increment);
- constexpr auto v3(_Ttesttype::modulus);
- constexpr auto v4(_Ttesttype::default_seed);
+ constexpr auto v1 __attribute__((unused))
+ = _Ttesttype::multiplier;
+ constexpr auto v2 __attribute__((unused))
+ = _Ttesttype::increment;
+ constexpr auto v3 __attribute__((unused))
+ = _Ttesttype::modulus;
+ constexpr auto v4 __attribute__((unused))
+ = _Ttesttype::default_seed;
}
};
diff --git a/libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/requirements/constexpr_functions.cc b/libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/requirements/constexpr_functions.cc
index cff1a67..7917a99 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/requirements/constexpr_functions.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/linear_congruential_engine/requirements/constexpr_functions.cc
@@ -33,8 +33,10 @@ namespace __gnu_test
{
void __constraint()
{
- constexpr auto v1(_Ttesttype::min());
- constexpr auto v2(_Ttesttype::max());
+ constexpr auto v1 __attribute__((unused))
+ = _Ttesttype::min();
+ constexpr auto v2 __attribute__((unused))
+ = _Ttesttype::max();
}
};
diff --git a/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/requirements/constexpr_data.cc b/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/requirements/constexpr_data.cc
index 17c89e1..4a27982 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/requirements/constexpr_data.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/requirements/constexpr_data.cc
@@ -33,20 +33,34 @@ namespace __gnu_test
{
void __constraint()
{
- constexpr auto v1(_Ttesttype::word_size);
- constexpr auto v2(_Ttesttype::state_size);
- constexpr auto v3(_Ttesttype::shift_size);
- constexpr auto v4(_Ttesttype::mask_bits);
- constexpr auto v5(_Ttesttype::xor_mask);
- constexpr auto v6(_Ttesttype::tempering_u);
- constexpr auto v7(_Ttesttype::tempering_d);
- constexpr auto v8(_Ttesttype::tempering_s);
- constexpr auto v9(_Ttesttype::tempering_b);
- constexpr auto v10(_Ttesttype::tempering_t);
- constexpr auto v11(_Ttesttype::tempering_c);
- constexpr auto v12(_Ttesttype::tempering_l);
- constexpr auto v13(_Ttesttype::initialization_multiplier);
- constexpr auto v14(_Ttesttype::default_seed);
+ constexpr auto v1 __attribute__((unused))
+ = _Ttesttype::word_size;
+ constexpr auto v2 __attribute__((unused))
+ = _Ttesttype::state_size;
+ constexpr auto v3 __attribute__((unused))
+ = _Ttesttype::shift_size;
+ constexpr auto v4 __attribute__((unused))
+ = _Ttesttype::mask_bits;
+ constexpr auto v5 __attribute__((unused))
+ = _Ttesttype::xor_mask;
+ constexpr auto v6 __attribute__((unused))
+ = _Ttesttype::tempering_u;
+ constexpr auto v7 __attribute__((unused))
+ = _Ttesttype::tempering_d;
+ constexpr auto v8 __attribute__((unused))
+ = _Ttesttype::tempering_s;
+ constexpr auto v9 __attribute__((unused))
+ = _Ttesttype::tempering_b;
+ constexpr auto v10 __attribute__((unused))
+ = _Ttesttype::tempering_t;
+ constexpr auto v11 __attribute__((unused))
+ = _Ttesttype::tempering_c;
+ constexpr auto v12 __attribute__((unused))
+ = _Ttesttype::tempering_l;
+ constexpr auto v13 __attribute__((unused))
+ = _Ttesttype::initialization_multiplier;
+ constexpr auto v14 __attribute__((unused))
+ = _Ttesttype::default_seed;
}
};
diff --git a/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/requirements/constexpr_functions.cc b/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/requirements/constexpr_functions.cc
index dd350e7..03513acf 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/requirements/constexpr_functions.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/requirements/constexpr_functions.cc
@@ -33,8 +33,10 @@ namespace __gnu_test
{
void __constraint()
{
- constexpr auto v1(_Ttesttype::min());
- constexpr auto v2(_Ttesttype::max());
+ constexpr auto v1 __attribute__((unused))
+ = _Ttesttype::min();
+ constexpr auto v2 __attribute__((unused))
+ = _Ttesttype::max();
}
};
diff --git a/libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/requirements/constexpr_data.cc b/libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/requirements/constexpr_data.cc
index 8a158fb..dde0006 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/requirements/constexpr_data.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/requirements/constexpr_data.cc
@@ -33,7 +33,8 @@ namespace __gnu_test
{
void __constraint()
{
- constexpr auto v1(_Ttesttype::table_size);
+ constexpr auto v1 __attribute__((unused))
+ = _Ttesttype::table_size;
}
};
diff --git a/libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/requirements/constexpr_functions.cc b/libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/requirements/constexpr_functions.cc
index 65e2e56..8829898 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/requirements/constexpr_functions.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/shuffle_order_engine/requirements/constexpr_functions.cc
@@ -33,8 +33,10 @@ namespace __gnu_test
{
void __constraint()
{
- constexpr auto v1(_Ttesttype::min());
- constexpr auto v2(_Ttesttype::max());
+ constexpr auto v1 __attribute__((unused))
+ = _Ttesttype::min();
+ constexpr auto v2 __attribute__((unused))
+ = _Ttesttype::max();
}
};
diff --git a/libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/requirements/constexpr_data.cc b/libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/requirements/constexpr_data.cc
index 0b51727..c22dae0 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/requirements/constexpr_data.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/requirements/constexpr_data.cc
@@ -33,10 +33,14 @@ namespace __gnu_test
{
void __constraint()
{
- constexpr auto v1(_Ttesttype::word_size);
- constexpr auto v2(_Ttesttype::short_lag);
- constexpr auto v3(_Ttesttype::long_lag);
- constexpr auto v4(_Ttesttype::default_seed);
+ constexpr auto v1 __attribute__((unused))
+ = _Ttesttype::word_size;
+ constexpr auto v2 __attribute__((unused))
+ = _Ttesttype::short_lag;
+ constexpr auto v3 __attribute__((unused))
+ = _Ttesttype::long_lag;
+ constexpr auto v4 __attribute__((unused))
+ = _Ttesttype::default_seed;
}
};
diff --git a/libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/requirements/constexpr_functions.cc b/libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/requirements/constexpr_functions.cc
index b05710a..39a3177 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/requirements/constexpr_functions.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/subtract_with_carry_engine/requirements/constexpr_functions.cc
@@ -33,8 +33,10 @@ namespace __gnu_test
{
void __constraint()
{
- constexpr auto v1(_Ttesttype::min());
- constexpr auto v2(_Ttesttype::max());
+ constexpr auto v1 __attribute__((unused))
+ = _Ttesttype::min();
+ constexpr auto v2 __attribute__((unused))
+ = _Ttesttype::max();
}
};
diff --git a/libstdc++-v3/testsuite/28_regex/05_constants/syntax_option_type.cc b/libstdc++-v3/testsuite/28_regex/05_constants/syntax_option_type.cc
index 71a11ef..1f9876c 100644
--- a/libstdc++-v3/testsuite/28_regex/05_constants/syntax_option_type.cc
+++ b/libstdc++-v3/testsuite/28_regex/05_constants/syntax_option_type.cc
@@ -70,15 +70,16 @@ test03()
option = ~std::regex_constants::awk;
option = ~std::regex_constants::grep;
option = ~std::regex_constants::egrep;
+ option = option;
}
void
test04_constexpr()
{
using namespace std::regex_constants;
- constexpr auto a1 = icase | awk;
- constexpr auto a2 = icase & awk;
- constexpr auto a3 = ~grep;
+ constexpr auto a1 __attribute__((unused)) = icase | awk;
+ constexpr auto a2 __attribute__((unused)) = icase & awk;
+ constexpr auto a3 __attribute__((unused)) = ~grep;
}
int main()
diff --git a/libstdc++-v3/testsuite/28_regex/08_basic_regex/requirements/constexpr_data.cc b/libstdc++-v3/testsuite/28_regex/08_basic_regex/requirements/constexpr_data.cc
index 7db1bbd..82d5c6f 100644
--- a/libstdc++-v3/testsuite/28_regex/08_basic_regex/requirements/constexpr_data.cc
+++ b/libstdc++-v3/testsuite/28_regex/08_basic_regex/requirements/constexpr_data.cc
@@ -33,16 +33,26 @@ namespace __gnu_test
{
void __constraint()
{
- constexpr auto v1(_Ttesttype::icase);
- constexpr auto v2(_Ttesttype::nosubs);
- constexpr auto v3(_Ttesttype::optimize);
- constexpr auto v4(_Ttesttype::collate);
- constexpr auto v5(_Ttesttype::ECMAScript);
- constexpr auto v6(_Ttesttype::basic);
- constexpr auto v7(_Ttesttype::extended);
- constexpr auto v8(_Ttesttype::awk);
- constexpr auto v9(_Ttesttype::grep);
- constexpr auto v10(_Ttesttype::egrep);
+ constexpr auto v1 __attribute__((unused))
+ = _Ttesttype::icase;
+ constexpr auto v2 __attribute__((unused))
+ = _Ttesttype::nosubs;
+ constexpr auto v3 __attribute__((unused))
+ = _Ttesttype::optimize;
+ constexpr auto v4 __attribute__((unused))
+ = _Ttesttype::collate;
+ constexpr auto v5 __attribute__((unused))
+ = _Ttesttype::ECMAScript;
+ constexpr auto v6 __attribute__((unused))
+ = _Ttesttype::basic;
+ constexpr auto v7 __attribute__((unused))
+ = _Ttesttype::extended;
+ constexpr auto v8 __attribute__((unused))
+ = _Ttesttype::awk;
+ constexpr auto v9 __attribute__((unused))
+ = _Ttesttype::grep;
+ constexpr auto v10 __attribute__((unused))
+ = _Ttesttype::egrep;
}
};
diff --git a/libstdc++-v3/testsuite/tr1/4_metaprogramming/integral_constant/requirements/constexpr_data.cc b/libstdc++-v3/testsuite/tr1/4_metaprogramming/integral_constant/requirements/constexpr_data.cc
deleted file mode 100644
index a44cace..0000000
--- a/libstdc++-v3/testsuite/tr1/4_metaprogramming/integral_constant/requirements/constexpr_data.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
-
-// Copyright (C) 2010 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3. If not see
-// <http://www.gnu.org/licenses/>.
-
-#include <type_traits>
-#include <testsuite_common_types.h>
-
-namespace __gnu_test
-{
- struct constexpr_member_data
- {
- template<typename _Ttesttype>
- void
- operator()()
- {
- struct _Concept
- {
- void __constraint()
- {
- constexpr auto v(_Ttesttype::value);
- }
- };
-
- _Concept c;
- c.__constraint();
- }
- };
-}
-
-int main()
-{
- __gnu_test::constexpr_member_data test;
- test.operator()<std::integral_constant<unsigned short, 69>>();
- test.operator()<std::integral_constant<bool, true>>();
- return 0;
-}
diff --git a/libstdc++-v3/testsuite/util/testsuite_common_types.h b/libstdc++-v3/testsuite/util/testsuite_common_types.h
index 4da2634..a402bcf 100644
--- a/libstdc++-v3/testsuite/util/testsuite_common_types.h
+++ b/libstdc++-v3/testsuite/util/testsuite_common_types.h
@@ -399,10 +399,10 @@ namespace __gnu_test
{
constexpr _Tp a = _Tp();
constexpr _Tp b = _Tp();
- constexpr _Tp c1 = a | b;
- constexpr _Tp c2 = a & b;
- constexpr _Tp c3 = a ^ b;
- constexpr _Tp c4 = ~b;
+ constexpr _Tp c1 __attribute__((unused)) = a | b;
+ constexpr _Tp c2 __attribute__((unused)) = a & b;
+ constexpr _Tp c3 __attribute__((unused)) = a ^ b;
+ constexpr _Tp c4 __attribute__((unused)) = ~b;
}
#endif
@@ -562,7 +562,7 @@ namespace __gnu_test
struct _Concept
{
void __constraint()
- { _Tp __v; }
+ { _Tp __v __attribute__((unused)); }
};
void (_Concept::*__x)() __attribute__((unused))