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
This commit is contained in:
parent
21736ec2f7
commit
a9992f7f6b
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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];
|
||||
}
|
||||
};
|
||||
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -33,7 +33,8 @@ namespace __gnu_test
|
||||
{
|
||||
void __constraint()
|
||||
{
|
||||
constexpr auto v1(_Ttesttype::table_size);
|
||||
constexpr auto v1 __attribute__((unused))
|
||||
= _Ttesttype::table_size;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
}
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user