summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-02 18:25:55 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-02 18:25:55 +0000
commit32a7faa5b5cc086184805968ad5cfe33a2d44044 (patch)
treec567f332ba859694781753c90bac55a5ab87b548 /libstdc++-v3/testsuite
parentebada1f5578ddbcdc7e4c6697267105aba8f8333 (diff)
downloadgcc-32a7faa5b5cc086184805968ad5cfe33a2d44044.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166210 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite')
-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
25 files changed, 211 insertions, 165 deletions
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 d5f3b3f3926..0b82a75db55 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 7c4852b2bbb..f1848f218c2 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 3986659f064..faeab3b93ec 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 a68aed6d45d..b8a89aee935 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 bc90adce0b0..2665a815f4b 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 feb77fb17fa..2beccd4fff6 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 ecb9a3e243a..df6c52dd45f 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 494a8dedd6f..ef8c5aac723 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 ac9a07f379c..d5b8b478c4d 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 74f7bf5515f..eae5ee7e89e 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 7f82bfee55f..1c70881fc7c 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 faec5bfad2f..77f4fb5786d 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 2b84ec855df..b10d36fb758 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 e7e9fc05311..1e8171b5c21 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 cff1a67caf1..7917a99066a 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 17c89e13bf9..4a27982b4f5 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 dd350e7fbd8..03513acf8fb 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 8a158fb9a42..dde00063e66 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 65e2e5612d5..8829898ff46 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 0b51727b1cd..c22dae0bb7c 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 b05710a9e67..39a3177ab67 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 71a11ef2106..1f9876cac12 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 7db1bbd5a4a..82d5c6ff4e2 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 a44cace607c..00000000000
--- 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 4da2634367c..a402bcf6b48 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))