From: Paolo Carlini Date: Wed, 12 Oct 2016 16:13:06 +0000 (+0000) Subject: testsuite_hooks.h: Rewrite VERIFY in terms of __builtin_printf and __builtin_abort. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=118c8424411e7a9a250bdf7ea7ac1975ffe31477;p=gcc.git testsuite_hooks.h: Rewrite VERIFY in terms of __builtin_printf and __builtin_abort. 2016-10-12 Paolo Carlini * testsuite/util/testsuite_hooks.h: Rewrite VERIFY in terms of __builtin_printf and __builtin_abort. * testsuite/lib/libstdc++.exp: Remove _GLIBCXX_ASSERT use. * scripts/testsuite_flags.in: Likewise. * testsuite/22_locale/time_get/get/char/1.cc: Likewise. * testsuite/22_locale/time_get/get/char/2.cc: Likewise. * testsuite/22_locale/time_get/get/wchar_t/1.cc: Likewise. * testsuite/22_locale/time_get/get/wchar_t/2.cc: Likewise. * testsuite/27_io/basic_filebuf/close/char/4879.cc: Likewise, adjust. * testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise. * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise. * testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc: Likewise. * testsuite/27_io/basic_filebuf/seekoff/char/26777.cc: Likewise. * testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc: Likewise. * testsuite/27_io/objects/char/7.cc: Likewise. * testsuite/27_io/objects/char/9661-1.cc: Likewise. * testsuite/27_io/objects/wchar_t/7.cc: Likewise. * testsuite/27_io/objects/wchar_t/9661-1.cc: Likewise. * testsuite/18_support/50594.cc: Remove 'test' variable, adjust. * testsuite/18_support/bad_alloc/what.cc: Likewise. * testsuite/18_support/bad_cast/what.cc: Likewise. * testsuite/18_support/bad_exception/what.cc: Likewise. * testsuite/18_support/bad_typeid/what.cc: Likewise. * testsuite/18_support/exception/38732.cc: Likewise. * testsuite/18_support/exception/what.cc: Likewise. * testsuite/18_support/exception_ptr/64241.cc: Likewise. * testsuite/18_support/exception_ptr/current_exception.cc: Likewise. * testsuite/18_support/exception_ptr/lifespan.cc: Likewise. * testsuite/18_support/exception_ptr/make_exception_ptr.cc: Likewise. * testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise. * testsuite/18_support/nested_exception/cons.cc: Likewise. * testsuite/18_support/nested_exception/nested_ptr.cc: Likewise. * testsuite/18_support/nested_exception/rethrow_if_nested.cc: Likewise. * testsuite/18_support/nested_exception/rethrow_nested.cc: Likewise. * testsuite/18_support/nested_exception/throw_with_nested.cc: Likewise. * testsuite/18_support/numeric_limits/char16_32_t.cc: Likewise. * testsuite/18_support/numeric_limits/digits10.cc: Likewise. * testsuite/18_support/numeric_limits/dr559.cc: Likewise. * testsuite/18_support/numeric_limits/epsilon.cc: Likewise. * testsuite/18_support/numeric_limits/is_iec559.cc: Likewise. * testsuite/18_support/numeric_limits/is_signed.cc: Likewise. * testsuite/18_support/numeric_limits/lowest.cc: Likewise. * testsuite/18_support/numeric_limits/max_digits10.cc: Likewise. * testsuite/18_support/numeric_limits/min_max.cc: Likewise. * testsuite/18_support/numeric_limits/specialization_default_values.cc: Likewise. * testsuite/18_support/type_info/hash_code.cc: Likewise. * testsuite/19_diagnostics/error_category/cons/copy_neg.cc: Likewise. * testsuite/19_diagnostics/error_category/cons/default.cc: Likewise. * testsuite/19_diagnostics/error_category/operators/equal.cc: Likewise. * testsuite/19_diagnostics/error_category/operators/ not_equal.cc: Likewise. * testsuite/19_diagnostics/error_code/cons/1.cc: Likewise. * testsuite/19_diagnostics/error_code/cons/39882.cc: Likewise. * testsuite/19_diagnostics/error_code/modifiers/39882.cc: Likewise. * testsuite/19_diagnostics/error_code/operators/bool.cc: Likewise. * testsuite/19_diagnostics/error_code/operators/equal.cc: Likewise. * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Likewise. * testsuite/19_diagnostics/error_condition/cons/1.cc: Likewise. * testsuite/19_diagnostics/error_condition/cons/39881.cc: Likewise. * testsuite/19_diagnostics/error_condition/modifiers/39881.cc: Likewise. * testsuite/19_diagnostics/error_condition/operators/bool.cc: Likewise. * testsuite/19_diagnostics/error_condition/operators/equal.cc: Likewise. * testsuite/19_diagnostics/error_condition/operators/not_equal.cc: Likewise. * testsuite/19_diagnostics/logic_error/what-1.cc: Likewise. * testsuite/19_diagnostics/logic_error/what-2.cc: Likewise. * testsuite/19_diagnostics/logic_error/what-3.cc: Likewise. * testsuite/19_diagnostics/logic_error/what-big.cc: Likewise. * testsuite/19_diagnostics/runtime_error/what-1.cc: Likewise. * testsuite/19_diagnostics/runtime_error/what-2.cc: Likewise. * testsuite/19_diagnostics/runtime_error/what-3.cc: Likewise. * testsuite/19_diagnostics/runtime_error/what-big.cc: Likewise. * testsuite/19_diagnostics/system_error/cons-1.cc: Likewise. * testsuite/19_diagnostics/system_error/what-1.cc: Likewise. * testsuite/19_diagnostics/system_error/what-2.cc: Likewise. * testsuite/19_diagnostics/system_error/what-3.cc: Likewise. * testsuite/19_diagnostics/system_error/what-4.cc: Likewise. * testsuite/19_diagnostics/system_error/what-big.cc: Likewise. * testsuite/20_util/addressof/1.cc: Likewise. * testsuite/20_util/align/1.cc: Likewise. * testsuite/20_util/align/2.cc: Likewise. * testsuite/20_util/allocator/1.cc: Likewise. * testsuite/20_util/allocator/10378.cc: Likewise. * testsuite/20_util/allocator/8230.cc: Likewise. * testsuite/20_util/allocator_traits/members/allocate_hint.cc: Likewise. * testsuite/20_util/allocator_traits/members/construct.cc: Likewise. * testsuite/20_util/allocator_traits/members/destroy.cc: Likewise. * testsuite/20_util/allocator_traits/members/max_size.cc: Likewise. * testsuite/20_util/any/assign/exception.cc: Likewise. * testsuite/20_util/auto_ptr/1.cc: Likewise. * testsuite/20_util/auto_ptr/2.cc: Likewise. * testsuite/20_util/auto_ptr/3.cc: Likewise. * testsuite/20_util/auto_ptr/4.cc: Likewise. * testsuite/20_util/auto_ptr/5.cc: Likewise. * testsuite/20_util/auto_ptr/6.cc: Likewise. * testsuite/20_util/auto_ptr/7.cc: Likewise. * testsuite/20_util/bind/all_bound.cc: Likewise. * testsuite/20_util/bind/conv_result.cc: Likewise. * testsuite/20_util/bind/cv_quals.cc: Likewise. * testsuite/20_util/bind/cv_quals_2.cc * testsuite/20_util/bind/nested.cc: Likewise. * testsuite/20_util/bind/placeholders.cc: Likewise. * testsuite/20_util/bind/ref.cc: Likewise. * testsuite/20_util/bind/ref2.cc: Likewise. * testsuite/20_util/common_type/requirements/typedefs-1.cc: Likewise. * testsuite/20_util/duration/arithmetic/1.cc: Likewise. * testsuite/20_util/duration/arithmetic/2.cc: Likewise. * testsuite/20_util/duration/arithmetic/58850.cc: Likewise. * testsuite/20_util/duration/arithmetic/dr2020.cc: Likewise. * testsuite/20_util/duration/arithmetic/dr934-2.cc: Likewise. * testsuite/20_util/duration/comparison_operators/1.cc: Likewise. * testsuite/20_util/duration/cons/1.cc: Likewise. * testsuite/20_util/duration/cons/2.cc: Likewise. * testsuite/20_util/enable_if/requirements/typedefs.cc: Likewise. * testsuite/20_util/enable_if/requirements/typedefs_neg.cc: Likewise. * testsuite/20_util/enable_shared_from_this/members/assign.cc: Likewise. * testsuite/20_util/exchange/1.cc: Likewise. * testsuite/20_util/forward/a.cc: Likewise. * testsuite/20_util/forward/b.cc: Likewise. * testsuite/20_util/forward/d.cc: Likewise. * testsuite/20_util/function/1.cc: Likewise. * testsuite/20_util/function/2.cc: Likewise. * testsuite/20_util/function/3.cc: Likewise. * testsuite/20_util/function/4.cc: Likewise. * testsuite/20_util/function/43397.cc: Likewise. * testsuite/20_util/function/5.cc: Likewise. * testsuite/20_util/function/6.cc: Likewise. * testsuite/20_util/function/7.cc: Likewise. * testsuite/20_util/function/8.cc: Likewise. * testsuite/20_util/function/9.cc: Likewise. * testsuite/20_util/function/assign/move.cc: Likewise. * testsuite/20_util/function/cons/move.cc: Likewise. * testsuite/20_util/function_objects/dr660.cc: Likewise. * testsuite/20_util/hash/chi2_q_bit_flip_set.cc: Likewise. * testsuite/20_util/hash/chi2_q_bit_string_set.cc: Likewise. * testsuite/20_util/hash/chi2_q_document_words.cc: Likewise. * testsuite/20_util/hash/chi2_q_numeric_pattern_set.cc: Likewise. * testsuite/20_util/hash/chi2_q_uniform_random.cc: Likewise. * testsuite/20_util/hash/operators/size_t.cc: Likewise. * testsuite/20_util/hash/quality.cc: Likewise. * testsuite/20_util/integral_constant/static_definition.cc: Likewise. * testsuite/20_util/integral_constant/true_false_value.cc: Likewise. * testsuite/20_util/is_function/24808.cc: Likewise. * testsuite/20_util/is_object/24808.cc: Likewise. * testsuite/20_util/move_if_noexcept/1.cc: Likewise. * testsuite/20_util/move_if_noexcept/constexpr.cc: Likewise. * testsuite/20_util/owner_less/cmp.cc: Likewise. * testsuite/20_util/pair/1.cc: Likewise. * testsuite/20_util/pair/2.cc: Likewise. * testsuite/20_util/pair/3.cc: Likewise. * testsuite/20_util/pair/4.cc: Likewise. * testsuite/20_util/pair/make_pair/constexpr.cc: Likewise. * testsuite/20_util/pair/moveable.cc: Likewise. * testsuite/20_util/pair/piecewise.cc: Likewise. * testsuite/20_util/pair/swap.cc: Likewise. * testsuite/20_util/ratio/comparisons/comp1.cc: Likewise. * testsuite/20_util/ratio/comparisons/comp2.cc: Likewise. * testsuite/20_util/ratio/comparisons/comp3.cc: Likewise. * testsuite/20_util/ratio/cons/cons1.cc: Likewise. * testsuite/20_util/ratio/operations/45866.cc: Likewise. * testsuite/20_util/ratio/operations/47913.cc: Likewise. * testsuite/20_util/ratio/operations/ops1.cc: Likewise. * testsuite/20_util/ratio/operations/ops2.cc: Likewise. * testsuite/20_util/ratio/operations/ops3.cc: Likewise. * testsuite/20_util/reference_wrapper/invoke.cc: Likewise. * testsuite/20_util/scoped_allocator/1.cc: Likewise. * testsuite/20_util/scoped_allocator/2.cc: Likewise. * testsuite/20_util/shared_ptr/assign/assign.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/move.cc: Likewise. * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/unique_ptr_lvalue_neg.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise. * testsuite/20_util/shared_ptr/comparison/less.cc: Likewise. * testsuite/20_util/shared_ptr/cons/alias.cc: Likewise. * testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise. * testsuite/20_util/shared_ptr/cons/default.cc: Likewise. * testsuite/20_util/shared_ptr/cons/move.cc: Likewise. * testsuite/20_util/shared_ptr/cons/nullptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/shared_ptr/cons/unique_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/cons/unique_ptr_array.cc: Likewise. * testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc: Likewise. * testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_1.cc: Likewise. * testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_2.cc: Likewise. * testsuite/20_util/shared_ptr/cons/unique_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr925.cc: Likewise. * testsuite/20_util/shared_ptr/creation/make.cc: Likewise. * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise. * testsuite/20_util/shared_ptr/hash/1.cc: Likewise. * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise. * testsuite/20_util/shared_ptr/misc/42019.cc: Likewise. * testsuite/20_util/shared_ptr/misc/io.cc: Likewise. * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise. * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise. * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise. * testsuite/20_util/shared_ptr/observers/get.cc: Likewise. * testsuite/20_util/shared_ptr/observers/owner_before.cc: Likewise. * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise. * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Likewise. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/20_util/specialized_algorithms/uninitialized_copy/ move_iterators/1.cc: Likewise. * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/ move_iterators/1.cc: Likewise. * testsuite/20_util/temporary_buffer.cc: Likewise. * testsuite/20_util/time_point/1.cc: Likewise. * testsuite/20_util/time_point/2.cc: Likewise. * testsuite/20_util/time_point/3.cc: Likewise. * testsuite/20_util/time_point/nonmember/constexpr.cc: Likewise. * testsuite/20_util/tuple/48476.cc: Likewise. * testsuite/20_util/tuple/comparison_operators/comparisons.cc: Likewise. * testsuite/20_util/tuple/cons/allocators.cc: Likewise. * testsuite/20_util/tuple/cons/assignment.cc: Likewise. * testsuite/20_util/tuple/cons/big_tuples.cc: Likewise. * testsuite/20_util/tuple/cons/constructor.cc: Likewise. * testsuite/20_util/tuple/creation_functions/23978.cc: Likewise. * testsuite/20_util/tuple/creation_functions/48476.cc: Likewise. * testsuite/20_util/tuple/creation_functions/constexpr.cc: Likewise. * testsuite/20_util/tuple/creation_functions/forward_as_tuple.cc: Likewise. * testsuite/20_util/tuple/creation_functions/make_tuple.cc: Likewise. * testsuite/20_util/tuple/creation_functions/tie.cc: Likewise. * testsuite/20_util/tuple/creation_functions/tie2.cc: Likewise. * testsuite/20_util/tuple/cv_tuple_size.cc: Likewise. * testsuite/20_util/tuple/element_access/get.cc: Likewise. * testsuite/20_util/tuple/element_access/get_by_type.cc: Likewise. * testsuite/20_util/tuple/moveable.cc: Likewise. * testsuite/20_util/tuple/swap.cc: Likewise. * testsuite/20_util/tuple/tuple_size.cc: Likewise. * testsuite/20_util/typeindex/comparison_operators.cc: Likewise. * testsuite/20_util/typeindex/hash.cc: Likewise. * testsuite/20_util/typeindex/hash_code.cc: Likewise. * testsuite/20_util/typeindex/name.cc: Likewise. * testsuite/20_util/unique_ptr/assign/48635.cc: Likewise. * testsuite/20_util/unique_ptr/assign/move.cc: Likewise. * testsuite/20_util/unique_ptr/assign/move_array.cc: Likewise. * testsuite/20_util/unique_ptr/assign/nullptr.cc: Likewise. * testsuite/20_util/unique_ptr/cons/auto_ptr.cc: Likewise. * testsuite/20_util/unique_ptr/cons/nullptr.cc: Likewise. * testsuite/20_util/unique_ptr/cons/pointer.cc: Likewise. * testsuite/20_util/unique_ptr/cons/pointer_array.cc: Likewise. * testsuite/20_util/unique_ptr/cons/ptr_deleter.cc: Likewise. * testsuite/20_util/unique_ptr/creation/array.cc: Likewise. * testsuite/20_util/unique_ptr/creation/single.cc: Likewise. * testsuite/20_util/unique_ptr/hash/1.cc: Likewise. * testsuite/20_util/unique_ptr/modifiers/43183.cc: Likewise. * testsuite/20_util/unique_ptr/specialized_algorithms/ comparisons.cc: Likewise. * testsuite/20_util/unique_ptr/specialized_algorithms/ comparisons_array.cc: Likewise. * testsuite/20_util/unique_ptr/specialized_algorithms/swap.cc: Likewise. * testsuite/20_util/uses_allocator/construction.cc: Likewise. * testsuite/20_util/uses_allocator/value.cc: Likewise. * testsuite/20_util/variant/run.cc: Likewise. * testsuite/20_util/weak_ptr/observers/owner_before.cc: Likewise. * testsuite/21_strings/basic_string/allocator/char/copy.cc: Likewise. * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc: Likewise. * testsuite/21_strings/basic_string/allocator/char/move.cc: Likewise. * testsuite/21_strings/basic_string/allocator/char/move_assign.cc: Likewise. * testsuite/21_strings/basic_string/allocator/char/swap.cc: Likewise. * testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc: Likewise. * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc: Likewise. * testsuite/21_strings/basic_string/allocator/wchar_t/move.cc: Likewise. * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc: Likewise. * testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc: Likewise. * testsuite/21_strings/basic_string/capacity/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/18654.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/2.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/shrink_to_fit.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/2.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/shrink_to_fit.cc: Likewise. * testsuite/21_strings/basic_string/cons/char/1.cc: Likewise. * testsuite/21_strings/basic_string/cons/char/2.cc: Likewise. * testsuite/21_strings/basic_string/cons/char/3.cc: Likewise. * testsuite/21_strings/basic_string/cons/char/4.cc: Likewise. * testsuite/21_strings/basic_string/cons/char/42261.cc: Likewise. * testsuite/21_strings/basic_string/cons/char/5.cc: Likewise. * testsuite/21_strings/basic_string/cons/char/6.cc: Likewise. * testsuite/21_strings/basic_string/cons/char/7.cc: Likewise. * testsuite/21_strings/basic_string/cons/char/8.cc: Likewise. * testsuite/21_strings/basic_string/cons/char/moveable.cc: Likewise. * testsuite/21_strings/basic_string/cons/char/moveable2.cc: Likewise. * testsuite/21_strings/basic_string/cons/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/cons/wchar_t/2.cc: Likewise. * testsuite/21_strings/basic_string/cons/wchar_t/3.cc: Likewise. * testsuite/21_strings/basic_string/cons/wchar_t/4.cc: Likewise. * testsuite/21_strings/basic_string/cons/wchar_t/42261.cc: Likewise. * testsuite/21_strings/basic_string/cons/wchar_t/5.cc: Likewise. * testsuite/21_strings/basic_string/cons/wchar_t/6.cc: Likewise. * testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise. * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise. * testsuite/21_strings/basic_string/cons/wchar_t/moveable.cc: Likewise. * testsuite/21_strings/basic_string/cons/wchar_t/moveable2.cc: Likewise. * testsuite/21_strings/basic_string/element_access/char/1.cc: Likewise. * testsuite/21_strings/basic_string/element_access/char/2.cc: Likewise. * testsuite/21_strings/basic_string/element_access/char/3.cc: Likewise. * testsuite/21_strings/basic_string/element_access/char/4.cc: Likewise. * testsuite/21_strings/basic_string/element_access/char/58163.cc: Likewise. * testsuite/21_strings/basic_string/element_access/char/empty.cc: Likewise. * testsuite/21_strings/basic_string/element_access/char/front_back.cc: Likewise. * testsuite/21_strings/basic_string/element_access/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/element_access/wchar_t/2.cc: Likewise. * testsuite/21_strings/basic_string/element_access/wchar_t/3.cc: Likewise. * testsuite/21_strings/basic_string/element_access/wchar_t/4.cc: Likewise. * testsuite/21_strings/basic_string/element_access/wchar_t/58163.cc: Likewise. * testsuite/21_strings/basic_string/element_access/wchar_t/empty.cc: Likewise. * testsuite/21_strings/basic_string/element_access/wchar_t/ front_back.cc: Likewise. * testsuite/21_strings/basic_string/init-list.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/char/1.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/char/10.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/char/11.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/char/ 28277.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/char/4.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/char/5.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/char/6.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/char/7.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/char/8.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/char/9.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/pod/ 10081-in.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/pod/ 10081-out.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/ 10.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/ 11.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/ 28277.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/8.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/9.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/append/char/1.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/append/char/2.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/append/char/3.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/append/char/4.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/append/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/append/wchar_t/2.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/append/wchar_t/3.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/assign/char/1.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/assign/char/2.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/assign/char/3.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/assign/char/4.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/assign/char/ move_assign.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/2.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/3.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/ move_assign.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/insert/char/1.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/insert/char/2.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/insert/char/3.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/2.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/pop_back/char/1.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/replace/char/1.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/replace/char/2.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/replace/char/3.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/replace/char/4.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/replace/char/5.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/replace/char/6.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/replace/char/7.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/2.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/3.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/4.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/5.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/6.cc: Likewise. * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/ stoull.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/ to_string.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ dr1261.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stod.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stof.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stoi.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stol.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stold.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stoll.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stoul.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stoull.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ to_wstring.cc: Likewise. * testsuite/21_strings/basic_string/operations/compare/char/1.cc: Likewise. * testsuite/21_strings/basic_string/operations/compare/char/13650.cc: Likewise. * testsuite/21_strings/basic_string/operations/compare/char/2.cc: Likewise. * testsuite/21_strings/basic_string/operations/compare/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/operations/compare/wchar_t/ 13650.cc: Likewise. * testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc: Likewise. * testsuite/21_strings/basic_string/operations/data/char/1.cc: Likewise. * testsuite/21_strings/basic_string/operations/data/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/operations/find/char/1.cc: Likewise. * testsuite/21_strings/basic_string/operations/find/char/2.cc: Likewise. * testsuite/21_strings/basic_string/operations/find/char/3.cc: Likewise. * testsuite/21_strings/basic_string/operations/find/char/4.cc: Likewise. * testsuite/21_strings/basic_string/operations/find/char/5.cc: Likewise. * testsuite/21_strings/basic_string/operations/find/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/operations/find/wchar_t/2.cc: Likewise. * testsuite/21_strings/basic_string/operations/find/wchar_t/3.cc: Likewise. * testsuite/21_strings/basic_string/operations/find/wchar_t/4.cc: Likewise. * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc: Likewise. * testsuite/21_strings/basic_string/operations/rfind/char/1.cc: Likewise. * testsuite/21_strings/basic_string/operations/rfind/char/2.cc: Likewise. * testsuite/21_strings/basic_string/operations/rfind/char/3.cc: Likewise. * testsuite/21_strings/basic_string/operations/rfind/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/operations/rfind/wchar_t/2.cc: Likewise. * testsuite/21_strings/basic_string/operations/rfind/wchar_t/3.cc: Likewise. * testsuite/21_strings/basic_string/operations/substr/char/1.cc: Likewise. * testsuite/21_strings/basic_string/operations/substr/wchar_t/ 1.cc: Likewise. * testsuite/21_strings/basic_string/operators/char/1.cc: Likewise. * testsuite/21_strings/basic_string/operators/char/2.cc: Likewise. * testsuite/21_strings/basic_string/operators/char/3.cc: Likewise. * testsuite/21_strings/basic_string/operators/char/4.cc: Likewise. * testsuite/21_strings/basic_string/operators/char/5.cc: Likewise. * testsuite/21_strings/basic_string/operators/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/operators/wchar_t/2.cc: Likewise. * testsuite/21_strings/basic_string/operators/wchar_t/3.cc: Likewise. * testsuite/21_strings/basic_string/operators/wchar_t/4.cc: Likewise. * testsuite/21_strings/basic_string/operators/wchar_t/5.cc: Likewise. * testsuite/21_strings/basic_string_view/capacity/1.cc: Likewise. * testsuite/21_strings/basic_string_view/cons/char/1.cc: Likewise. * testsuite/21_strings/basic_string_view/cons/char/2.cc: Likewise. * testsuite/21_strings/basic_string_view/cons/char/3.cc: Likewise. * testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc: Likewise. * testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc: Likewise. * testsuite/21_strings/basic_string_view/element_access/char/ 1.cc: Likewise. * testsuite/21_strings/basic_string_view/element_access/char/ empty.cc: Likewise. * testsuite/21_strings/basic_string_view/element_access/char/ front_back.cc: Likewise. * testsuite/21_strings/basic_string_view/element_access/wchar_t/ 1.cc: Likewise. * testsuite/21_strings/basic_string_view/element_access/wchar_t/ empty.cc: Likewise. * testsuite/21_strings/basic_string_view/element_access/wchar_t/ front_back.cc: Likewise. * testsuite/21_strings/basic_string_view/inserters/char/1.cc: Likewise. * testsuite/21_strings/basic_string_view/inserters/char/2.cc: Likewise. * testsuite/21_strings/basic_string_view/inserters/char/3.cc: Likewise. * testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc: Likewise. * testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc: Likewise. * testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc: Likewise. * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/ char/1.cc: Likewise. * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/ wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/ char/1.cc: Likewise. * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/ wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/compare/char/ 1.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/compare/char/ 13650.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/ 1.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/ 13650.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/data/char/1.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/find/char/1.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/find/char/2.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/find/char/3.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/find/char/4.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/find/wchar_t/ 1.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/find/wchar_t/ 2.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/find/wchar_t/ 3.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/find/wchar_t/ 4.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/rfind/char/ 1.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/rfind/char/ 2.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/rfind/char/ 3.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/ 1.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/ 2.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/ 3.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/string_conversion/ 1.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/substr/char/ 1.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/ 1.cc: Likewise. * testsuite/21_strings/basic_string_view/operators/char/2.cc: Likewise. * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc: Likewise. * testsuite/21_strings/c_strings/char/1.cc: Likewise. * testsuite/21_strings/c_strings/wchar_t/1.cc: Likewise. * testsuite/21_strings/char_traits/requirements/char/1.cc: Likewise. * testsuite/21_strings/char_traits/requirements/char/57704.cc: Likewise. * testsuite/21_strings/char_traits/requirements/short/1.cc: Likewise. * testsuite/21_strings/char_traits/requirements/wchar_t/1.cc: Likewise. * doc/xml/manual/test.xml: Fix typo. From-SVN: r241069 --- diff --git a/libstdc++-v3/doc/xml/manual/test.xml b/libstdc++-v3/doc/xml/manual/test.xml index 39a67a1f6e2..a1781e52ddf 100644 --- a/libstdc++-v3/doc/xml/manual/test.xml +++ b/libstdc++-v3/doc/xml/manual/test.xml @@ -564,7 +564,7 @@ cat 27_io/objects/char/3_xin.in | a.out make, or via options for the DejaGnu test framework (described below). The latter approach uses the option that was shown earlier. - For example, to run the tests with + For example, to run the tests with you could use: make RUNTESTFLAGS=--target_board=unix/-O1/-D_GLIBCXX_ASSERTIONS diff --git a/libstdc++-v3/scripts/testsuite_flags.in b/libstdc++-v3/scripts/testsuite_flags.in index ea1a4643cb8..cf7f0f7411e 100755 --- a/libstdc++-v3/scripts/testsuite_flags.in +++ b/libstdc++-v3/scripts/testsuite_flags.in @@ -56,7 +56,7 @@ case ${query} in echo ${CC} ;; --cxxflags) - CXXFLAGS_default="-D_GLIBCXX_ASSERT -fmessage-length=0 -fno-show-column" + CXXFLAGS_default="-fmessage-length=0 -fno-show-column" CXXFLAGS_config="@SECTION_FLAGS@ @EXTRA_CXX_FLAGS@" echo ${CXXFLAGS_default} ${CXXFLAGS_config} ;; diff --git a/libstdc++-v3/testsuite/18_support/50594.cc b/libstdc++-v3/testsuite/18_support/50594.cc index 82b00f2c9dd..88c87ee8ad5 100644 --- a/libstdc++-v3/testsuite/18_support/50594.cc +++ b/libstdc++-v3/testsuite/18_support/50594.cc @@ -56,8 +56,6 @@ void operator delete(void* p) // libstdc++/50594 void test01() { - bool test __attribute__((unused)) = true; - { std::string s = "Hello World, this is not a small string."; } diff --git a/libstdc++-v3/testsuite/18_support/bad_alloc/what.cc b/libstdc++-v3/testsuite/18_support/bad_alloc/what.cc index 951ef2314d8..c12852bf0b8 100644 --- a/libstdc++-v3/testsuite/18_support/bad_alloc/what.cc +++ b/libstdc++-v3/testsuite/18_support/bad_alloc/what.cc @@ -26,7 +26,6 @@ // libstdc++/14493 void test01() { - bool test __attribute__((unused)) = true; using namespace std; bad_alloc ba; diff --git a/libstdc++-v3/testsuite/18_support/bad_cast/what.cc b/libstdc++-v3/testsuite/18_support/bad_cast/what.cc index d69ce9bcaab..b960660955c 100644 --- a/libstdc++-v3/testsuite/18_support/bad_cast/what.cc +++ b/libstdc++-v3/testsuite/18_support/bad_cast/what.cc @@ -26,7 +26,6 @@ // libstdc++/14493 void test01() { - bool test __attribute__((unused)) = true; using namespace std; bad_cast bc; diff --git a/libstdc++-v3/testsuite/18_support/bad_exception/what.cc b/libstdc++-v3/testsuite/18_support/bad_exception/what.cc index dfb19c75561..28df237a743 100644 --- a/libstdc++-v3/testsuite/18_support/bad_exception/what.cc +++ b/libstdc++-v3/testsuite/18_support/bad_exception/what.cc @@ -26,7 +26,6 @@ // libstdc++/14493 void test01() { - bool test __attribute__((unused)) = true; using namespace std; bad_exception be; diff --git a/libstdc++-v3/testsuite/18_support/bad_typeid/what.cc b/libstdc++-v3/testsuite/18_support/bad_typeid/what.cc index 4469236ddce..633175b2440 100644 --- a/libstdc++-v3/testsuite/18_support/bad_typeid/what.cc +++ b/libstdc++-v3/testsuite/18_support/bad_typeid/what.cc @@ -26,7 +26,6 @@ // libstdc++/14493 void test01() { - bool test __attribute__((unused)) = true; using namespace std; bad_typeid bt; diff --git a/libstdc++-v3/testsuite/18_support/exception/38732.cc b/libstdc++-v3/testsuite/18_support/exception/38732.cc index 132173bd2c5..926c47d04dd 100644 --- a/libstdc++-v3/testsuite/18_support/exception/38732.cc +++ b/libstdc++-v3/testsuite/18_support/exception/38732.cc @@ -61,7 +61,6 @@ extern "C" __cxa_eh_globals *__cxa_get_globals () throw(); // PR libstdc++/38732 void test01 () { - bool test __attribute__((unused)) = true; try { throw 0; } catch(...) { diff --git a/libstdc++-v3/testsuite/18_support/exception/what.cc b/libstdc++-v3/testsuite/18_support/exception/what.cc index 6e4e7d69810..334923de1ae 100644 --- a/libstdc++-v3/testsuite/18_support/exception/what.cc +++ b/libstdc++-v3/testsuite/18_support/exception/what.cc @@ -26,7 +26,6 @@ // libstdc++/14493 void test01() { - bool test __attribute__((unused)) = true; using namespace std; exception e; diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc index fbb01ae9c33..c1e9a05943f 100644 --- a/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc +++ b/libstdc++-v3/testsuite/18_support/exception_ptr/64241.cc @@ -25,7 +25,7 @@ void test01() { - bool test __attribute__((unused)) = true; + bool test = true; { // Put some non-zero bytes on the stack void* p __attribute__((unused)) = &test; diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc index 2383ceecf91..79459ebab60 100644 --- a/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc +++ b/libstdc++-v3/testsuite/18_support/exception_ptr/current_exception.cc @@ -27,7 +27,6 @@ void test01() { - bool test __attribute__((unused)) = true; using namespace std; exception_ptr ep = current_exception(); @@ -36,7 +35,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; using namespace std; try { @@ -49,7 +47,6 @@ void test02() void test03() { - bool test __attribute__((unused)) = true; using namespace std; try { @@ -62,7 +59,6 @@ void test03() void test04() { - bool test __attribute__((unused)) = true; using namespace std; try { diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc index e350df33381..ada652e7436 100644 --- a/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc +++ b/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc @@ -39,7 +39,6 @@ public: void test01() { - bool test __attribute__((unused)) = true; using namespace std; may_destruct = false; @@ -56,7 +55,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; using namespace std; may_destruct = false; @@ -71,7 +69,6 @@ void test02() void test03() { - bool test __attribute__((unused)) = true; using namespace std; may_destruct = false; @@ -89,7 +86,6 @@ void test03() void test04() { - bool test __attribute__((unused)) = true; using namespace std; may_destruct = false; @@ -119,7 +115,6 @@ void test05_helper() void test05() { - bool test __attribute__((unused)) = true; using namespace std; may_destruct = false; @@ -145,7 +140,6 @@ void test06_helper() void test06() { - bool test __attribute__((unused)) = true; using namespace std; may_destruct = false; @@ -165,7 +159,6 @@ std::exception_ptr gep; void test99() { - bool test __attribute__((unused)) = true; using namespace std; may_destruct = false; diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc index b496bb37ec5..b9ded3589f0 100644 --- a/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc +++ b/libstdc++-v3/testsuite/18_support/exception_ptr/make_exception_ptr.cc @@ -23,8 +23,6 @@ void test01() { - bool test __attribute__((unused)) = true; - std::exception_ptr p = std::make_exception_ptr(0); VERIFY( !(p == 0) ); diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc index f0b61b15122..567af32e947 100644 --- a/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc +++ b/libstdc++-v3/testsuite/18_support/exception_ptr/rethrow_exception.cc @@ -40,7 +40,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; using namespace std; try { diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc b/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc index e652c31ab40..af6f90c56f6 100644 --- a/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc +++ b/libstdc++-v3/testsuite/18_support/nested_exception/cons.cc @@ -23,8 +23,6 @@ void test01() { - bool test __attribute__((unused)) = true; - std::nested_exception e; VERIFY( e.nested_ptr() == 0 ); @@ -32,8 +30,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; - try { throw 42; diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc b/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc index bfb8ee08cbd..467d371846f 100644 --- a/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc +++ b/libstdc++-v3/testsuite/18_support/nested_exception/nested_ptr.cc @@ -23,8 +23,6 @@ void test01() { - bool test __attribute__((unused)) = true; - try { throw std::nested_exception(); @@ -37,8 +35,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; - try { throw 42; diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc index 77512133009..b0420846a2b 100644 --- a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc +++ b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_if_nested.cc @@ -30,7 +30,7 @@ struct derived2 : base, std::nested_exception { }; void test01() { - bool test __attribute__((unused)) = false; + bool test = false; try { @@ -55,7 +55,7 @@ void test01() void test02() { - bool test __attribute__((unused)) = false; + bool test = false; try { @@ -72,7 +72,7 @@ void test02() void test03() { - bool test __attribute__((unused)) = false; + bool test = false; try { diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc index 31d822ba11a..fd374e530e0 100644 --- a/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc +++ b/libstdc++-v3/testsuite/18_support/nested_exception/rethrow_nested.cc @@ -23,7 +23,7 @@ void test01() { - bool test __attribute__((unused)) = false; + bool test = false; try { diff --git a/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc b/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc index ac37f020dc7..f768b1e5166 100644 --- a/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc +++ b/libstdc++-v3/testsuite/18_support/nested_exception/throw_with_nested.cc @@ -30,7 +30,7 @@ struct uninheritable final { }; void test01() { - bool test __attribute__((unused)) = false; + bool test = false; try { @@ -53,7 +53,7 @@ void test01() void test02() { - bool test __attribute__((unused)) = false; + bool test = false; try { @@ -76,7 +76,7 @@ void test02() void test03() { - bool test __attribute__((unused)) = false; + bool test = false; try { diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/char16_32_t.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/char16_32_t.cc index 546c5b2c49c..9e3aadb6f53 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits/char16_32_t.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits/char16_32_t.cc @@ -31,8 +31,6 @@ template void do_test() { - bool test __attribute__((unused)) = true; - typedef std::numeric_limits char_type; typedef std::numeric_limits impl_type; diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/digits10.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/digits10.cc index ea08d560b5d..aa2ec00f6ad 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits/digits10.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits/digits10.cc @@ -28,10 +28,8 @@ #include // libstdc++/5045 -bool test03() +void test03() { - bool test __attribute__((unused)) = true; - VERIFY( std::numeric_limits::digits10 == 0 ); if (__CHAR_BIT__ == 8) { @@ -53,7 +51,6 @@ bool test03() VERIFY( std::numeric_limits::digits10 == 18 ); VERIFY( std::numeric_limits::digits10 == 19 ); } - return test; } int main() diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/dr559.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/dr559.cc index f4979fdda6f..35ec411cfd0 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits/dr559.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits/dr559.cc @@ -26,7 +26,6 @@ template void do_test_aux() { - bool test __attribute__((unused)) = true; typedef std::numeric_limits cv_limits; typedef std::numeric_limits::type> limits; diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/epsilon.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/epsilon.cc index 5a2aa7bdca4..c999fee8b01 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits/epsilon.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits/epsilon.cc @@ -30,7 +30,6 @@ template void test_epsilon() { - bool test __attribute__((unused)) = true; T epsilon = std::numeric_limits::epsilon(); T one = 1; diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/is_iec559.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/is_iec559.cc index 1930d15bef7..f6f5b675e3f 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits/is_iec559.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits/is_iec559.cc @@ -52,10 +52,8 @@ test_is_iec559() } // libstdc++/8949 -bool test04() +void test04() { - bool test __attribute__((unused)) = true; - VERIFY( !std::numeric_limits::is_iec559 ); VERIFY( !std::numeric_limits::is_iec559 ); VERIFY( !std::numeric_limits::is_iec559 ); @@ -64,7 +62,6 @@ bool test04() VERIFY( !std::numeric_limits::is_iec559 ); VERIFY( !std::numeric_limits::is_iec559 ); VERIFY( !std::numeric_limits::is_iec559 ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/is_signed.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/is_signed.cc index 47a48bbcf5a..88face421c4 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits/is_signed.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits/is_signed.cc @@ -35,7 +35,6 @@ void test_sign() { - bool test __attribute__((unused)) = true; VERIFY( std::numeric_limits::is_signed == char_is_signed ); VERIFY( std::numeric_limits::is_signed == true ); VERIFY( std::numeric_limits::is_signed == false ); diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/lowest.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/lowest.cc index 8969ddfd67f..9001f31ac34 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits/lowest.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits/lowest.cc @@ -30,7 +30,6 @@ template void do_test(std::true_type) { - bool test __attribute__((unused)) = true; T limits_min = std::numeric_limits::min(); VERIFY( std::numeric_limits::lowest() == limits_min ); } @@ -39,7 +38,6 @@ template void do_test(std::false_type) { - bool test __attribute__((unused)) = true; T limits_max = std::numeric_limits::max(); VERIFY( std::numeric_limits::lowest() == -limits_max ); } diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/max_digits10.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/max_digits10.cc index 4f5c601732c..f6a51143508 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits/max_digits10.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits/max_digits10.cc @@ -29,8 +29,6 @@ void test01() { - bool test __attribute__((unused)) = true; - VERIFY( std::numeric_limits::max_digits10 == 0 ); VERIFY( std::numeric_limits::max_digits10 == 0 ); VERIFY( std::numeric_limits::max_digits10 == 0 ); diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/min_max.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/min_max.cc index d51c58f2492..2cdddedba5c 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits/min_max.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits/min_max.cc @@ -61,7 +61,6 @@ DEFINE_EXTREMA(long double, LDBL_MIN, LDBL_MAX); template void test_extrema() { - bool test __attribute__((unused)) = true; T limits_min = std::numeric_limits::min(); T limits_max = std::numeric_limits::max(); T extrema_min = extrema::min; diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits/specialization_default_values.cc b/libstdc++-v3/testsuite/18_support/numeric_limits/specialization_default_values.cc index 6c11b6a534d..04ba194f4c1 100644 --- a/libstdc++-v3/testsuite/18_support/numeric_limits/specialization_default_values.cc +++ b/libstdc++-v3/testsuite/18_support/numeric_limits/specialization_default_values.cc @@ -43,9 +43,8 @@ struct B }; -bool test01() +void test01() { - bool test __attribute__((unused)) = true; std::numeric_limits< A > obj; VERIFY( !obj.is_specialized ); @@ -78,7 +77,6 @@ bool test01() VERIFY( !obj.traps ); VERIFY( !obj.tinyness_before ); VERIFY( obj.round_style == std::round_toward_zero ); - return test; } // test linkage of the generic bits diff --git a/libstdc++-v3/testsuite/18_support/type_info/hash_code.cc b/libstdc++-v3/testsuite/18_support/type_info/hash_code.cc index 8758222b20e..4bf3d2456bc 100644 --- a/libstdc++-v3/testsuite/18_support/type_info/hash_code.cc +++ b/libstdc++-v3/testsuite/18_support/type_info/hash_code.cc @@ -24,7 +24,6 @@ void test01() { - bool test __attribute__((unused)) = true; using namespace std; class Abraca { }; diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc b/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc index 56e9f286d85..c7b98ba88b3 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/copy_neg.cc @@ -23,8 +23,6 @@ int main() { - bool test __attribute__((unused)) = true; - __gnu_test::test_category c1; __gnu_test::test_category c2(c1); // { dg-error "deleted" } diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/default.cc b/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/default.cc index e3238ce751d..d801a9662bf 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/default.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/error_category/cons/default.cc @@ -23,8 +23,6 @@ int main() { - bool test __attribute__((unused)) = true; - // 1 __gnu_test::test_category c1; __gnu_test::test_derived_category c2; diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/equal.cc b/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/equal.cc index 52c4b451ed3..134c46a832e 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/equal.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/equal.cc @@ -24,8 +24,6 @@ int main() { - bool test __attribute__((unused)) = true; - __gnu_test::test_category c1; __gnu_test::test_derived_category c2; VERIFY( c1 == c1 ); diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/not_equal.cc b/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/not_equal.cc index 7ba797c25bc..5c412e13e4b 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/not_equal.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/error_category/operators/not_equal.cc @@ -23,8 +23,6 @@ int main() { - bool test __attribute__((unused)) = true; - __gnu_test::test_category c1; __gnu_test::test_derived_category c2; VERIFY( !(c1 != c1) ); diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/1.cc b/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/1.cc index d89f0168c4a..ecddfb6f9a4 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/1.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/1.cc @@ -24,8 +24,6 @@ int main() { - bool test __attribute__((unused)) = true; - // 1 std::error_code e1; VERIFY( e1.value() == 0 ); diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/39882.cc b/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/39882.cc index 989f29d683e..f441c213d35 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/39882.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/39882.cc @@ -47,8 +47,6 @@ namespace std // libstdc++/39882 void test01() { - bool test __attribute__((unused)) = true; - std::error_code ec1(my_err); VERIFY( ec1 == make_error_code(my_err) ); } diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_code/modifiers/39882.cc b/libstdc++-v3/testsuite/19_diagnostics/error_code/modifiers/39882.cc index d810d7bae5c..878aa216d68 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/error_code/modifiers/39882.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/error_code/modifiers/39882.cc @@ -47,8 +47,6 @@ namespace std // libstdc++/39882 void test01() { - bool test __attribute__((unused)) = true; - std::error_code ec2; ec2 = my_err; VERIFY( ec2 == make_error_code(my_err) ); diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc index 0452d0b4aae..a8949d8ec48 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc @@ -25,8 +25,6 @@ // unspecified bool operator positive tests int main() { - bool test __attribute__((unused)) = true; - // 1 std::error_code e1; if (static_cast(e1)) diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/equal.cc b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/equal.cc index 1b493fbb250..193a7ce4545 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/equal.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/equal.cc @@ -25,8 +25,6 @@ // unspecified bool operator positive tests int main() { - bool test __attribute__((unused)) = true; - std::error_code e1; std::error_code e2(std::make_error_code(std::errc::operation_not_supported)); diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/not_equal.cc b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/not_equal.cc index e4696cf7086..544d126ba6f 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/not_equal.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/not_equal.cc @@ -25,8 +25,6 @@ // unspecified bool operator positive tests int main() { - bool test __attribute__((unused)) = true; - std::error_code e1; std::error_code e2(std::make_error_code(std::errc::operation_not_supported)); diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/1.cc b/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/1.cc index 772164cb4b9..51cfcae93a3 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/1.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/1.cc @@ -23,8 +23,6 @@ void test01() { - bool test __attribute__((unused)) = true; - // 1 std::error_condition e1; VERIFY( e1.value() == 0 ); diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/39881.cc b/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/39881.cc index d989847f56e..6198cde32a8 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/39881.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/39881.cc @@ -47,8 +47,6 @@ namespace std // libstdc++/39881 void test01() { - bool test __attribute__((unused)) = true; - std::error_condition ec1(my_err); VERIFY( ec1 == make_error_condition(my_err) ); } diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_condition/modifiers/39881.cc b/libstdc++-v3/testsuite/19_diagnostics/error_condition/modifiers/39881.cc index 98515c8daa2..7c144064ad6 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/error_condition/modifiers/39881.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/error_condition/modifiers/39881.cc @@ -47,8 +47,6 @@ namespace std // libstdc++/39881 void test01() { - bool test __attribute__((unused)) = true; - std::error_condition ec2; ec2 = my_err; VERIFY( ec2 == make_error_condition(my_err) ); diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/bool.cc b/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/bool.cc index ccb0def1f92..e5ed5c5df1b 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/bool.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/bool.cc @@ -24,8 +24,6 @@ // unspecified bool operator positive tests void test01() { - bool test __attribute__((unused)) = true; - // 1 std::error_condition e1; if (static_cast(e1)) diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/equal.cc b/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/equal.cc index ad57353f889..3a4bcdd6c03 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/equal.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/equal.cc @@ -24,8 +24,6 @@ // unspecified bool operator positive tests void test01() { - bool test __attribute__((unused)) = true; - std::error_condition e1; std::error_condition e2(std::errc::operation_not_supported); diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/not_equal.cc b/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/not_equal.cc index e8b0c2edd5c..6c060310451 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/not_equal.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/error_condition/operators/not_equal.cc @@ -24,8 +24,6 @@ // unspecified bool operator positive tests void test01() { - bool test __attribute__((unused)) = true; - std::error_condition e1; std::error_condition e2(std::errc::operation_not_supported); diff --git a/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-1.cc b/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-1.cc index 4b8bfeac024..c2ef01eac25 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-1.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-1.cc @@ -27,7 +27,6 @@ // libstdc++/1972 void test01() { - bool test __attribute__((unused)) = true; std::string s("lack of sunlight, no water error"); // 1 @@ -42,7 +41,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; std::string s("lack of sunlight error"); std::domain_error x(s); diff --git a/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-2.cc b/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-2.cc index 6d79b638fae..dab91a7f588 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-2.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-2.cc @@ -33,7 +33,6 @@ public: void test03() { - bool test __attribute__((unused)) = true; try { throw fuzzy_logic(); } catch(const fuzzy_logic& obj) diff --git a/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-3.cc b/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-3.cc index 2e6468ac751..9bbc8cf1e79 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-3.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-3.cc @@ -38,7 +38,6 @@ void allocate_on_stack(void) void test04() { - bool test __attribute__((unused)) = true; const std::string s("CA ISO emergency once again:immediate power down"); const char* strlit1 = "wish I lived in Palo Alto"; const char* strlit2 = "...or Santa Barbara"; diff --git a/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-big.cc b/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-big.cc index 5e050ac335f..85aca9a0286 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-big.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/logic_error/what-big.cc @@ -27,7 +27,6 @@ void test01() { typedef std::logic_error test_type; - bool test __attribute__((unused)) = true; const std::string xxx(10000, 'x'); test_type t(xxx); VERIFY( std::strcmp(t.what(), xxx.c_str()) == 0 ); diff --git a/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-1.cc b/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-1.cc index 05a67a7019e..c3b08ab6321 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-1.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-1.cc @@ -27,7 +27,6 @@ // libstdc++/1972 void test01() { - bool test __attribute__((unused)) = true; std::string s("lack of sunlight, no water error"); // 1 @@ -42,7 +41,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; std::string s("lack of sunlight error"); std::range_error x(s); diff --git a/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-2.cc b/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-2.cc index 74346c1c396..27cf7d927d4 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-2.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-2.cc @@ -33,7 +33,6 @@ public: void test03() { - bool test __attribute__((unused)) = true; try { throw fuzzy_logic(); } catch(const fuzzy_logic& obj) diff --git a/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-3.cc b/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-3.cc index 47d87372c44..70a8b5dce82 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-3.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-3.cc @@ -40,7 +40,6 @@ void allocate_on_stack(void) void test04() { - bool test __attribute__((unused)) = true; const std::string s("CA ISO emergency once again:immediate power down"); const char* strlit1 = "wish I lived in Palo Alto"; const char* strlit2 = "...or Santa Barbara"; diff --git a/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-big.cc b/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-big.cc index 08a71f4719e..76089a68f5c 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-big.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/runtime_error/what-big.cc @@ -27,7 +27,6 @@ void test01() { typedef std::runtime_error test_type; - bool test __attribute__((unused)) = true; const std::string xxx(10000, 'x'); test_type t(xxx); VERIFY( std::strcmp(t.what(), xxx.c_str()) == 0 ); diff --git a/libstdc++-v3/testsuite/19_diagnostics/system_error/cons-1.cc b/libstdc++-v3/testsuite/19_diagnostics/system_error/cons-1.cc index 4a86e385da1..adbece7f88d 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/system_error/cons-1.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/system_error/cons-1.cc @@ -24,7 +24,6 @@ int main() { - bool test __attribute__((unused)) = true; const std::string s("too late: boulangerie out of pain au raisin"); const std::error_code e(std::make_error_code(std::errc::operation_not_supported)); diff --git a/libstdc++-v3/testsuite/19_diagnostics/system_error/what-1.cc b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-1.cc index 89455b61df8..6a83ef354b4 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/system_error/what-1.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-1.cc @@ -28,7 +28,6 @@ using namespace std; // libstdc++/1972 void test01() { - bool test __attribute__((unused)) = true; string s("lack of sunlight, no water error"); // 1 @@ -43,7 +42,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; string s("lack of sunlight error"); system_error x(error_code(), s); diff --git a/libstdc++-v3/testsuite/19_diagnostics/system_error/what-2.cc b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-2.cc index c7c9d16e7cd..f6865b9cef9 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/system_error/what-2.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-2.cc @@ -32,7 +32,6 @@ public: void test03() { - bool test __attribute__((unused)) = true; try { throw fuzzy_logic(); } catch(const fuzzy_logic& obj) diff --git a/libstdc++-v3/testsuite/19_diagnostics/system_error/what-3.cc b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-3.cc index edb4d764609..eedac88e734 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/system_error/what-3.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-3.cc @@ -37,7 +37,6 @@ void allocate_on_stack(void) void test04() { - bool test __attribute__((unused)) = true; const std::string s("CA ISO emergency once again:immediate power down"); const char* strlit1 = "wish I lived in Palo Alto"; const char* strlit2 = "...or Santa Barbara"; diff --git a/libstdc++-v3/testsuite/19_diagnostics/system_error/what-4.cc b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-4.cc index fb6420e9cdb..fbd19e3fb26 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/system_error/what-4.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-4.cc @@ -26,7 +26,6 @@ // Make sure each invocation of what() doesn't grow the message. void test01() { - bool test __attribute__((unused)) = true; std::string s("after nine thirty, this request cannot be met"); std::system_error obj = diff --git a/libstdc++-v3/testsuite/19_diagnostics/system_error/what-big.cc b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-big.cc index f680486c178..ba970768bcd 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/system_error/what-big.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/system_error/what-big.cc @@ -26,7 +26,6 @@ void test01() { typedef std::system_error test_type; - bool test __attribute__((unused)) = true; const std::string xxx(10000, 'x'); test_type t(std::error_code(), xxx); VERIFY( std::string(t.what()).find(xxx) != std::string::npos ); diff --git a/libstdc++-v3/testsuite/20_util/addressof/1.cc b/libstdc++-v3/testsuite/20_util/addressof/1.cc index 16482cb6b93..333a3f77a1b 100644 --- a/libstdc++-v3/testsuite/20_util/addressof/1.cc +++ b/libstdc++-v3/testsuite/20_util/addressof/1.cc @@ -27,7 +27,6 @@ void f1(int) { } void test01() { - bool test __attribute__((unused)) = true; using namespace __gnu_test; OverloadedAddress* ao1 = new OverloadedAddress(); diff --git a/libstdc++-v3/testsuite/20_util/align/1.cc b/libstdc++-v3/testsuite/20_util/align/1.cc index bb037332a78..39b2c70bf1b 100644 --- a/libstdc++-v3/testsuite/20_util/align/1.cc +++ b/libstdc++-v3/testsuite/20_util/align/1.cc @@ -30,8 +30,6 @@ void test01() { - bool test __attribute__((unused)) = true; - size_t space = 100; void* ptr = new char[space]; char* const orig_ptr = static_cast(ptr); diff --git a/libstdc++-v3/testsuite/20_util/align/2.cc b/libstdc++-v3/testsuite/20_util/align/2.cc index 2c43ac2e6a3..2308048ad10 100644 --- a/libstdc++-v3/testsuite/20_util/align/2.cc +++ b/libstdc++-v3/testsuite/20_util/align/2.cc @@ -27,8 +27,6 @@ void test01() { - bool test __attribute__((unused)) = true; - int i = 0; void* ptr = &i; auto space = sizeof(i); diff --git a/libstdc++-v3/testsuite/20_util/allocator/1.cc b/libstdc++-v3/testsuite/20_util/allocator/1.cc index 4fc1aef1ea3..6905c86bd2d 100644 --- a/libstdc++-v3/testsuite/20_util/allocator/1.cc +++ b/libstdc++-v3/testsuite/20_util/allocator/1.cc @@ -44,7 +44,6 @@ void operator delete(void *v) throw() void test01() { - bool test __attribute__((unused)) = true; std::allocator obj; // NB: These should work for various size allocation and diff --git a/libstdc++-v3/testsuite/20_util/allocator/10378.cc b/libstdc++-v3/testsuite/20_util/allocator/10378.cc index 7987e1aa4c8..a8384799ae0 100644 --- a/libstdc++-v3/testsuite/20_util/allocator/10378.cc +++ b/libstdc++-v3/testsuite/20_util/allocator/10378.cc @@ -32,7 +32,6 @@ public: void test01() { using namespace std; - bool test __attribute__((unused)) = true; list uniset; uniset.push_back(Bob()); diff --git a/libstdc++-v3/testsuite/20_util/allocator/8230.cc b/libstdc++-v3/testsuite/20_util/allocator/8230.cc index dd2d4925414..d99c7b858df 100644 --- a/libstdc++-v3/testsuite/20_util/allocator/8230.cc +++ b/libstdc++-v3/testsuite/20_util/allocator/8230.cc @@ -26,7 +26,7 @@ // libstdc++/8230 void test02() { - bool test __attribute__((unused)) = true; + bool test = true; try { std::allocator alloc; diff --git a/libstdc++-v3/testsuite/20_util/allocator_traits/members/allocate_hint.cc b/libstdc++-v3/testsuite/20_util/allocator_traits/members/allocate_hint.cc index ba8eddee3ca..ceb524cb4b6 100644 --- a/libstdc++-v3/testsuite/20_util/allocator_traits/members/allocate_hint.cc +++ b/libstdc++-v3/testsuite/20_util/allocator_traits/members/allocate_hint.cc @@ -46,8 +46,6 @@ struct hintable_allocator void test01() { - bool test __attribute__((unused)) = true; - typedef std::allocator_traits> traits_type; traits_type::allocator_type a; traits_type::const_void_pointer v; @@ -74,8 +72,6 @@ struct unhintable_allocator void test02() { - bool test __attribute__((unused)) = true; - typedef std::allocator_traits> traits_type; traits_type::allocator_type a; traits_type::const_void_pointer v; diff --git a/libstdc++-v3/testsuite/20_util/allocator_traits/members/construct.cc b/libstdc++-v3/testsuite/20_util/allocator_traits/members/construct.cc index 6d616f1eee8..7b1adb98cbc 100644 --- a/libstdc++-v3/testsuite/20_util/allocator_traits/members/construct.cc +++ b/libstdc++-v3/testsuite/20_util/allocator_traits/members/construct.cc @@ -52,8 +52,6 @@ struct fake_allocator void test01() { - bool test __attribute__((unused)) = true; - typedef std::allocator_traits> traits_type; traits_type::allocator_type a; X* p = traits_type::allocate(a, 1); diff --git a/libstdc++-v3/testsuite/20_util/allocator_traits/members/destroy.cc b/libstdc++-v3/testsuite/20_util/allocator_traits/members/destroy.cc index 930b0b1e6ba..0ce84046e8d 100644 --- a/libstdc++-v3/testsuite/20_util/allocator_traits/members/destroy.cc +++ b/libstdc++-v3/testsuite/20_util/allocator_traits/members/destroy.cc @@ -53,8 +53,6 @@ struct allocator_without_destroy void test01() { - bool test __attribute__((unused)) = true; - typedef std::allocator_traits> traits_type; traits_type::allocator_type a; X* p = 0; @@ -65,8 +63,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; - typedef std::allocator_traits> traits_type; traits_type::allocator_type a; char buf[sizeof(X)]; diff --git a/libstdc++-v3/testsuite/20_util/allocator_traits/members/max_size.cc b/libstdc++-v3/testsuite/20_util/allocator_traits/members/max_size.cc index c274c4a76ba..745acca3550 100644 --- a/libstdc++-v3/testsuite/20_util/allocator_traits/members/max_size.cc +++ b/libstdc++-v3/testsuite/20_util/allocator_traits/members/max_size.cc @@ -42,8 +42,6 @@ struct unsized_allocator void test01() { - bool test __attribute__((unused)) = true; - typedef std::allocator_traits> traits_type; traits_type::allocator_type a; auto size = a.max_size(); @@ -52,8 +50,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; - typedef std::allocator_traits> traits_type; traits_type::allocator_type a; auto size = std::numeric_limits::max(); @@ -62,8 +58,6 @@ void test02() void test03() { - bool test __attribute__((unused)) = true; - typedef std::allocator_traits> traits_type; traits_type::allocator_type a; auto size = std::numeric_limits::max(); diff --git a/libstdc++-v3/testsuite/20_util/any/assign/exception.cc b/libstdc++-v3/testsuite/20_util/any/assign/exception.cc index 11a1a55ce80..31a87a2b439 100644 --- a/libstdc++-v3/testsuite/20_util/any/assign/exception.cc +++ b/libstdc++-v3/testsuite/20_util/any/assign/exception.cc @@ -57,8 +57,8 @@ int main() a1 = a2; } catch (...) { auto x = std::any_cast(a1); - assert(del_count == 0); - assert(a1.has_value()); + VERIFY( del_count == 0 ); + VERIFY( a1.has_value() ); std::any_cast(a1); } std::any a3 = Good(); @@ -70,8 +70,8 @@ int main() a3 = a4; } catch (...) { auto x = std::any_cast(a1); - assert(del_count == 0); - assert(a1.has_value()); + VERIFY( del_count == 0 ); + VERIFY( a1.has_value() ); std::any_cast(a1); } } diff --git a/libstdc++-v3/testsuite/20_util/auto_ptr/1.cc b/libstdc++-v3/testsuite/20_util/auto_ptr/1.cc index c0cafa895da..55a25e94de4 100644 --- a/libstdc++-v3/testsuite/20_util/auto_ptr/1.cc +++ b/libstdc++-v3/testsuite/20_util/auto_ptr/1.cc @@ -62,7 +62,6 @@ int test01() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::auto_ptr A_default; VERIFY( A_default.get() == 0 ); diff --git a/libstdc++-v3/testsuite/20_util/auto_ptr/2.cc b/libstdc++-v3/testsuite/20_util/auto_ptr/2.cc index 8200edbd257..47b24bbef17 100644 --- a/libstdc++-v3/testsuite/20_util/auto_ptr/2.cc +++ b/libstdc++-v3/testsuite/20_util/auto_ptr/2.cc @@ -59,7 +59,6 @@ int test02() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::auto_ptr A_from_A(new A); std::auto_ptr B_from_B(new B); diff --git a/libstdc++-v3/testsuite/20_util/auto_ptr/3.cc b/libstdc++-v3/testsuite/20_util/auto_ptr/3.cc index 3245fa75501..82c87b838cf 100644 --- a/libstdc++-v3/testsuite/20_util/auto_ptr/3.cc +++ b/libstdc++-v3/testsuite/20_util/auto_ptr/3.cc @@ -59,7 +59,6 @@ int test03() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::auto_ptr A_from_ptr_A; std::auto_ptr A_from_ptr_B; diff --git a/libstdc++-v3/testsuite/20_util/auto_ptr/4.cc b/libstdc++-v3/testsuite/20_util/auto_ptr/4.cc index 8455c923621..279665f1688 100644 --- a/libstdc++-v3/testsuite/20_util/auto_ptr/4.cc +++ b/libstdc++-v3/testsuite/20_util/auto_ptr/4.cc @@ -60,7 +60,6 @@ int test04() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; {/*lifetine scope*/ std::auto_ptr A_from_A(new A); diff --git a/libstdc++-v3/testsuite/20_util/auto_ptr/5.cc b/libstdc++-v3/testsuite/20_util/auto_ptr/5.cc index a9e9032a45b..16e28ca90e0 100644 --- a/libstdc++-v3/testsuite/20_util/auto_ptr/5.cc +++ b/libstdc++-v3/testsuite/20_util/auto_ptr/5.cc @@ -68,7 +68,6 @@ private: int test05() { - bool test __attribute__((unused)) = true; reset_count_struct __attribute__((unused)) reset; pimpl(); diff --git a/libstdc++-v3/testsuite/20_util/auto_ptr/6.cc b/libstdc++-v3/testsuite/20_util/auto_ptr/6.cc index 54581207691..02545c72b32 100644 --- a/libstdc++-v3/testsuite/20_util/auto_ptr/6.cc +++ b/libstdc++-v3/testsuite/20_util/auto_ptr/6.cc @@ -61,7 +61,6 @@ int test06() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::auto_ptr A_from_A(new A); std::auto_ptr A_from_A_ptr(A_from_A.release()); diff --git a/libstdc++-v3/testsuite/20_util/auto_ptr/7.cc b/libstdc++-v3/testsuite/20_util/auto_ptr/7.cc index 32ca098cdab..1e8319f29ff 100644 --- a/libstdc++-v3/testsuite/20_util/auto_ptr/7.cc +++ b/libstdc++-v3/testsuite/20_util/auto_ptr/7.cc @@ -70,7 +70,6 @@ static void drain(std::auto_ptr) int test07() { - bool test __attribute__((unused)) = true; reset_count_struct __attribute__((unused)) reset; drain(source()); diff --git a/libstdc++-v3/testsuite/20_util/bind/all_bound.cc b/libstdc++-v3/testsuite/20_util/bind/all_bound.cc index 9f6570c528f..cf70f39c474 100644 --- a/libstdc++-v3/testsuite/20_util/bind/all_bound.cc +++ b/libstdc++-v3/testsuite/20_util/bind/all_bound.cc @@ -24,8 +24,6 @@ // Operations on empty function<> objects void test01() { - bool test __attribute__((unused)) = true; - VERIFY( std::bind(std::plus(), 3, 5)() == 8 ); VERIFY( std::bind(std::minus(), 3, 5)() == -2 ); VERIFY( std::bind(std::plus(), 3, 5)() == 8 ); diff --git a/libstdc++-v3/testsuite/20_util/bind/conv_result.cc b/libstdc++-v3/testsuite/20_util/bind/conv_result.cc index cf7aa1cc7fd..1d6d91ab766 100644 --- a/libstdc++-v3/testsuite/20_util/bind/conv_result.cc +++ b/libstdc++-v3/testsuite/20_util/bind/conv_result.cc @@ -30,7 +30,6 @@ struct X void test01() { - bool test __attribute__((unused)) = true; using std::bind; using std::ref; ::X x = { true }; diff --git a/libstdc++-v3/testsuite/20_util/bind/cv_quals.cc b/libstdc++-v3/testsuite/20_util/bind/cv_quals.cc index e81780e2c29..ebf654fd268 100644 --- a/libstdc++-v3/testsuite/20_util/bind/cv_quals.cc +++ b/libstdc++-v3/testsuite/20_util/bind/cv_quals.cc @@ -42,8 +42,6 @@ using std::placeholders::_2; void test01() { - bool test __attribute__((unused)) = true; - auto b0 = std::bind(X()); VERIFY( b0() == 0 ); @@ -59,8 +57,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; - auto b0 = std::bind(X()); VERIFY( b0() == 0 ); @@ -76,8 +72,6 @@ void test02() void test03() { - bool test __attribute__((unused)) = true; - auto b0 = std::bind(X(), 0, _1, _2); VERIFY( b0(0, 0) == 0 ); @@ -93,8 +87,6 @@ void test03() void test04() { - bool test __attribute__((unused)) = true; - auto b0 = std::bind(X(), 0, _1, _2); VERIFY( b0(0, 0) == 0 ); diff --git a/libstdc++-v3/testsuite/20_util/bind/cv_quals_2.cc b/libstdc++-v3/testsuite/20_util/bind/cv_quals_2.cc index a3b5c3b899f..9252285bb2a 100644 --- a/libstdc++-v3/testsuite/20_util/bind/cv_quals_2.cc +++ b/libstdc++-v3/testsuite/20_util/bind/cv_quals_2.cc @@ -30,8 +30,6 @@ struct X void test01() { - bool test __attribute__((unused)) = true; - const auto b0 = std::bind(X()); VERIFY( b0() == 0 ); diff --git a/libstdc++-v3/testsuite/20_util/bind/nested.cc b/libstdc++-v3/testsuite/20_util/bind/nested.cc index 04425eff68f..823978e3d27 100644 --- a/libstdc++-v3/testsuite/20_util/bind/nested.cc +++ b/libstdc++-v3/testsuite/20_util/bind/nested.cc @@ -24,7 +24,6 @@ // Operations on empty function<> objects void test01() { - bool test __attribute__((unused)) = true; using namespace std::placeholders; int five = 5; diff --git a/libstdc++-v3/testsuite/20_util/bind/placeholders.cc b/libstdc++-v3/testsuite/20_util/bind/placeholders.cc index 14b9ffbde71..0ddaa01d264 100644 --- a/libstdc++-v3/testsuite/20_util/bind/placeholders.cc +++ b/libstdc++-v3/testsuite/20_util/bind/placeholders.cc @@ -24,7 +24,6 @@ // Operations on empty function<> objects void test01() { - bool test __attribute__((unused)) = true; using namespace std::placeholders; int five = 5; diff --git a/libstdc++-v3/testsuite/20_util/bind/ref.cc b/libstdc++-v3/testsuite/20_util/bind/ref.cc index 6b7fc53621d..a0c7e60d50f 100644 --- a/libstdc++-v3/testsuite/20_util/bind/ref.cc +++ b/libstdc++-v3/testsuite/20_util/bind/ref.cc @@ -37,7 +37,6 @@ private: // Operations on empty function<> objects void test01() { - bool test __attribute__((unused)) = true; using std::bind; using std::ref; ::X x; diff --git a/libstdc++-v3/testsuite/20_util/bind/ref2.cc b/libstdc++-v3/testsuite/20_util/bind/ref2.cc index 161a2b266e7..d9ba387a293 100644 --- a/libstdc++-v3/testsuite/20_util/bind/ref2.cc +++ b/libstdc++-v3/testsuite/20_util/bind/ref2.cc @@ -28,8 +28,6 @@ int inc(int& i) { return ++i; } void test01() { - bool test __attribute__((unused)) = true; - int counter = 0; std::bind(&inc, _1)(counter); VERIFY(counter == 1 ); @@ -47,8 +45,6 @@ struct Inc void test02() { - bool test __attribute__((unused)) = true; - int counter = 0; std::bind(Inc(), _1)(counter); VERIFY(counter == 1 ); diff --git a/libstdc++-v3/testsuite/20_util/common_type/requirements/typedefs-1.cc b/libstdc++-v3/testsuite/20_util/common_type/requirements/typedefs-1.cc index 12ea6071a6d..163426dd88d 100644 --- a/libstdc++-v3/testsuite/20_util/common_type/requirements/typedefs-1.cc +++ b/libstdc++-v3/testsuite/20_util/common_type/requirements/typedefs-1.cc @@ -66,7 +66,6 @@ struct B : A { }; void test01() { - bool test __attribute__((unused)) = true; using std::common_type; using std::is_same; @@ -98,7 +97,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; using std::common_type; using std::is_same; diff --git a/libstdc++-v3/testsuite/20_util/duration/arithmetic/1.cc b/libstdc++-v3/testsuite/20_util/duration/arithmetic/1.cc index b74ae9af8c9..3f642b9dcab 100644 --- a/libstdc++-v3/testsuite/20_util/duration/arithmetic/1.cc +++ b/libstdc++-v3/testsuite/20_util/duration/arithmetic/1.cc @@ -27,7 +27,6 @@ void test01() { - bool test __attribute__((unused)) = true; using namespace std::chrono; duration d0(3); @@ -59,7 +58,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; using namespace std::chrono; duration d7(3); diff --git a/libstdc++-v3/testsuite/20_util/duration/arithmetic/2.cc b/libstdc++-v3/testsuite/20_util/duration/arithmetic/2.cc index 015f2abe6cf..d3282eaaee1 100644 --- a/libstdc++-v3/testsuite/20_util/duration/arithmetic/2.cc +++ b/libstdc++-v3/testsuite/20_util/duration/arithmetic/2.cc @@ -27,7 +27,6 @@ void test01() { - bool test __attribute__((unused)) = true; using namespace std::chrono; duration d0(12); diff --git a/libstdc++-v3/testsuite/20_util/duration/arithmetic/58850.cc b/libstdc++-v3/testsuite/20_util/duration/arithmetic/58850.cc index 24f7f09af87..489125814c3 100644 --- a/libstdc++-v3/testsuite/20_util/duration/arithmetic/58850.cc +++ b/libstdc++-v3/testsuite/20_util/duration/arithmetic/58850.cc @@ -23,7 +23,6 @@ void test01() { - bool test __attribute__((unused)) = true; using namespace std::chrono; typedef duration> Years; diff --git a/libstdc++-v3/testsuite/20_util/duration/arithmetic/dr2020.cc b/libstdc++-v3/testsuite/20_util/duration/arithmetic/dr2020.cc index 994e4f75bce..e9bc53cf06e 100644 --- a/libstdc++-v3/testsuite/20_util/duration/arithmetic/dr2020.cc +++ b/libstdc++-v3/testsuite/20_util/duration/arithmetic/dr2020.cc @@ -26,7 +26,6 @@ // DR 2020 void test01() { - bool test __attribute__((unused)) = true; using namespace std::chrono; constexpr duration d0(12); diff --git a/libstdc++-v3/testsuite/20_util/duration/arithmetic/dr934-2.cc b/libstdc++-v3/testsuite/20_util/duration/arithmetic/dr934-2.cc index 2073fb8db49..e059c9632d0 100644 --- a/libstdc++-v3/testsuite/20_util/duration/arithmetic/dr934-2.cc +++ b/libstdc++-v3/testsuite/20_util/duration/arithmetic/dr934-2.cc @@ -25,7 +25,6 @@ void test01() { - bool test __attribute__((unused)) = true; using namespace std::chrono; const duration d0(17); diff --git a/libstdc++-v3/testsuite/20_util/duration/comparison_operators/1.cc b/libstdc++-v3/testsuite/20_util/duration/comparison_operators/1.cc index 59d458f8426..8a44e6ba8ce 100644 --- a/libstdc++-v3/testsuite/20_util/duration/comparison_operators/1.cc +++ b/libstdc++-v3/testsuite/20_util/duration/comparison_operators/1.cc @@ -27,7 +27,6 @@ void test01() { - bool test __attribute__((unused)) = true; using namespace std::chrono; duration d0(12); diff --git a/libstdc++-v3/testsuite/20_util/duration/cons/1.cc b/libstdc++-v3/testsuite/20_util/duration/cons/1.cc index fe54142affa..d880ec208e5 100644 --- a/libstdc++-v3/testsuite/20_util/duration/cons/1.cc +++ b/libstdc++-v3/testsuite/20_util/duration/cons/1.cc @@ -106,7 +106,6 @@ typedef type_emulator dbl_emulator; void test01() { - bool test __attribute__((unused)) = true; using std::chrono::duration; int r = 3; diff --git a/libstdc++-v3/testsuite/20_util/duration/cons/2.cc b/libstdc++-v3/testsuite/20_util/duration/cons/2.cc index e41f09391d3..ead01bb99b9 100644 --- a/libstdc++-v3/testsuite/20_util/duration/cons/2.cc +++ b/libstdc++-v3/testsuite/20_util/duration/cons/2.cc @@ -87,7 +87,6 @@ typedef type_emulator dbl_emulator; void test01() { - bool test __attribute__((unused)) = true; using namespace std::chrono; duration d0(3); diff --git a/libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs.cc index 86f99cf1f48..b23cc34cd81 100644 --- a/libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs.cc +++ b/libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs.cc @@ -23,7 +23,6 @@ void test01() { - bool test __attribute__((unused)) = true; using std::enable_if; // Positive tests. diff --git a/libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs_neg.cc index b047856ccb3..7ff151a4193 100644 --- a/libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs_neg.cc +++ b/libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs_neg.cc @@ -24,11 +24,10 @@ void test01() { - bool test __attribute__((unused)) = true; using std::enable_if; // Negative tests. typedef enable_if::type test2_type; } -// { dg-error "does not name a type" "" { target *-*-* } 31 } +// { dg-error "does not name a type" "" { target *-*-* } 30 } diff --git a/libstdc++-v3/testsuite/20_util/enable_shared_from_this/members/assign.cc b/libstdc++-v3/testsuite/20_util/enable_shared_from_this/members/assign.cc index 024ccb07f89..58c0442d600 100644 --- a/libstdc++-v3/testsuite/20_util/enable_shared_from_this/members/assign.cc +++ b/libstdc++-v3/testsuite/20_util/enable_shared_from_this/members/assign.cc @@ -24,7 +24,6 @@ struct X : public std::enable_shared_from_this { }; void test01() { - bool test __attribute__((unused)) = true; auto x1 = std::make_shared(), x2 = std::make_shared(); *x1 = *x2; VERIFY( x1->shared_from_this() != x2->shared_from_this() ); diff --git a/libstdc++-v3/testsuite/20_util/exchange/1.cc b/libstdc++-v3/testsuite/20_util/exchange/1.cc index c8f3c9bb5ea..42396117587 100644 --- a/libstdc++-v3/testsuite/20_util/exchange/1.cc +++ b/libstdc++-v3/testsuite/20_util/exchange/1.cc @@ -41,8 +41,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; - struct DefaultConstructible { DefaultConstructible(int i = 0) : value(i) { } @@ -63,8 +61,6 @@ double f(double) { return 0; } void test03() { - bool test __attribute__((unused)) = true; - int (*fp)(int); std::exchange(fp, &f); VERIFY( fp != nullptr ); diff --git a/libstdc++-v3/testsuite/20_util/forward/a.cc b/libstdc++-v3/testsuite/20_util/forward/a.cc index b2b808afd7c..6ecf7fbfc22 100644 --- a/libstdc++-v3/testsuite/20_util/forward/a.cc +++ b/libstdc++-v3/testsuite/20_util/forward/a.cc @@ -45,7 +45,6 @@ public: void test() const { - bool test __attribute__((unused)) = true; VERIFY( data_ == 3 ); } }; diff --git a/libstdc++-v3/testsuite/20_util/forward/b.cc b/libstdc++-v3/testsuite/20_util/forward/b.cc index f2ae8da6f40..6b00c583f4c 100644 --- a/libstdc++-v3/testsuite/20_util/forward/b.cc +++ b/libstdc++-v3/testsuite/20_util/forward/b.cc @@ -45,7 +45,6 @@ public: void test() const { - bool test __attribute__((unused)) = true; VERIFY( data_ == 3 ); } }; diff --git a/libstdc++-v3/testsuite/20_util/forward/d.cc b/libstdc++-v3/testsuite/20_util/forward/d.cc index a0264161821..3e23ccfee8a 100644 --- a/libstdc++-v3/testsuite/20_util/forward/d.cc +++ b/libstdc++-v3/testsuite/20_util/forward/d.cc @@ -45,7 +45,6 @@ public: void test() const { - bool test __attribute__((unused)) = true; VERIFY( data_ == 3 ); } }; diff --git a/libstdc++-v3/testsuite/20_util/function/1.cc b/libstdc++-v3/testsuite/20_util/function/1.cc index 4d06df33413..a3442ec3979 100644 --- a/libstdc++-v3/testsuite/20_util/function/1.cc +++ b/libstdc++-v3/testsuite/20_util/function/1.cc @@ -24,8 +24,6 @@ using namespace __gnu_test; -bool test __attribute__((unused)) = true; - // Operations on empty function<> objects void test01() { diff --git a/libstdc++-v3/testsuite/20_util/function/2.cc b/libstdc++-v3/testsuite/20_util/function/2.cc index 2fd6d3273e1..b5dd40e050c 100644 --- a/libstdc++-v3/testsuite/20_util/function/2.cc +++ b/libstdc++-v3/testsuite/20_util/function/2.cc @@ -25,8 +25,6 @@ using namespace __gnu_test; -bool test __attribute__((unused)) = true; - // Put function pointers into function<> wrappers void test02() { diff --git a/libstdc++-v3/testsuite/20_util/function/3.cc b/libstdc++-v3/testsuite/20_util/function/3.cc index 8739248134a..a4d62aa3b1f 100644 --- a/libstdc++-v3/testsuite/20_util/function/3.cc +++ b/libstdc++-v3/testsuite/20_util/function/3.cc @@ -25,8 +25,6 @@ using namespace __gnu_test; -bool test __attribute__((unused)) = true; - // Put nearly-matching function pointers into function<> wrappers void test03() { diff --git a/libstdc++-v3/testsuite/20_util/function/4.cc b/libstdc++-v3/testsuite/20_util/function/4.cc index 0827475d59c..00f471616d3 100644 --- a/libstdc++-v3/testsuite/20_util/function/4.cc +++ b/libstdc++-v3/testsuite/20_util/function/4.cc @@ -25,8 +25,6 @@ using namespace __gnu_test; -bool test __attribute__((unused)) = true; - // Put function objects into function<> wrappers void test04() { diff --git a/libstdc++-v3/testsuite/20_util/function/43397.cc b/libstdc++-v3/testsuite/20_util/function/43397.cc index b8a268081a6..aae172b9401 100644 --- a/libstdc++-v3/testsuite/20_util/function/43397.cc +++ b/libstdc++-v3/testsuite/20_util/function/43397.cc @@ -36,8 +36,6 @@ struct Foo void test01() { - bool test __attribute__((unused)) = true; - using std::function; using std::ref; diff --git a/libstdc++-v3/testsuite/20_util/function/5.cc b/libstdc++-v3/testsuite/20_util/function/5.cc index cfaa770abb4..9d599dcfca2 100644 --- a/libstdc++-v3/testsuite/20_util/function/5.cc +++ b/libstdc++-v3/testsuite/20_util/function/5.cc @@ -25,8 +25,6 @@ using namespace __gnu_test; -bool test __attribute__((unused)) = true; - // Put member pointers into function<> wrappers void test05() { diff --git a/libstdc++-v3/testsuite/20_util/function/6.cc b/libstdc++-v3/testsuite/20_util/function/6.cc index 1ec27f6d710..180fbff3efd 100644 --- a/libstdc++-v3/testsuite/20_util/function/6.cc +++ b/libstdc++-v3/testsuite/20_util/function/6.cc @@ -24,8 +24,6 @@ using namespace __gnu_test; -bool test __attribute__((unused)) = true; - struct secret {}; struct noncopyable_function_object_type diff --git a/libstdc++-v3/testsuite/20_util/function/7.cc b/libstdc++-v3/testsuite/20_util/function/7.cc index ef939d70796..097438ca02f 100644 --- a/libstdc++-v3/testsuite/20_util/function/7.cc +++ b/libstdc++-v3/testsuite/20_util/function/7.cc @@ -25,8 +25,6 @@ using namespace __gnu_test; -bool test __attribute__((unused)) = true; - // Put reference_wrappers to function pointers into function<> wrappers void test07() { diff --git a/libstdc++-v3/testsuite/20_util/function/8.cc b/libstdc++-v3/testsuite/20_util/function/8.cc index 49299a47542..7b8bcc0107b 100644 --- a/libstdc++-v3/testsuite/20_util/function/8.cc +++ b/libstdc++-v3/testsuite/20_util/function/8.cc @@ -25,8 +25,6 @@ using namespace __gnu_test; -bool test __attribute__((unused)) = true; - // Put reference_wrappers to member pointers void test08() { diff --git a/libstdc++-v3/testsuite/20_util/function/9.cc b/libstdc++-v3/testsuite/20_util/function/9.cc index 704476ad973..88c4a041b67 100644 --- a/libstdc++-v3/testsuite/20_util/function/9.cc +++ b/libstdc++-v3/testsuite/20_util/function/9.cc @@ -25,8 +25,6 @@ using namespace __gnu_test; -bool test __attribute__((unused)) = true; - // Put function objects into a void-returning function<> wrapper void test09() { diff --git a/libstdc++-v3/testsuite/20_util/function/assign/move.cc b/libstdc++-v3/testsuite/20_util/function/assign/move.cc index c4860eeaafc..7caf8edff10 100644 --- a/libstdc++-v3/testsuite/20_util/function/assign/move.cc +++ b/libstdc++-v3/testsuite/20_util/function/assign/move.cc @@ -25,8 +25,6 @@ struct { int operator()() { return 2; } } f2; void test01() { - bool test __attribute__((unused)) = true; - typedef std::function function; function fo(f1); diff --git a/libstdc++-v3/testsuite/20_util/function/cons/move.cc b/libstdc++-v3/testsuite/20_util/function/cons/move.cc index f2c1bcb3add..f88a04118c4 100644 --- a/libstdc++-v3/testsuite/20_util/function/cons/move.cc +++ b/libstdc++-v3/testsuite/20_util/function/cons/move.cc @@ -25,8 +25,6 @@ struct { int operator()() { return 2; } } f2; void test01() { - bool test __attribute__((unused)) = true; - typedef std::function function; function fo(f1); diff --git a/libstdc++-v3/testsuite/20_util/function_objects/dr660.cc b/libstdc++-v3/testsuite/20_util/function_objects/dr660.cc index 83bf0201e2e..592cec12424 100644 --- a/libstdc++-v3/testsuite/20_util/function_objects/dr660.cc +++ b/libstdc++-v3/testsuite/20_util/function_objects/dr660.cc @@ -23,8 +23,6 @@ // DR 660. Missing Bitwise Operations. void test01() { - bool test __attribute__((unused)) = true; - for (int i1 = 0; i1 < 1000; ++i1) for (int i2 = 0; i2 < 1000; ++i2) { diff --git a/libstdc++-v3/testsuite/20_util/hash/chi2_q_bit_flip_set.cc b/libstdc++-v3/testsuite/20_util/hash/chi2_q_bit_flip_set.cc index 8da12a064db..58762aa7b62 100644 --- a/libstdc++-v3/testsuite/20_util/hash/chi2_q_bit_flip_set.cc +++ b/libstdc++-v3/testsuite/20_util/hash/chi2_q_bit_flip_set.cc @@ -27,7 +27,6 @@ void test_bit_flip_set() { - bool test __attribute__((unused)) = true; const unsigned long N = SAMPLES; const unsigned long k = N/100; const unsigned int len = 67; diff --git a/libstdc++-v3/testsuite/20_util/hash/chi2_q_bit_string_set.cc b/libstdc++-v3/testsuite/20_util/hash/chi2_q_bit_string_set.cc index 8275523d753..7cc5b7cc543 100644 --- a/libstdc++-v3/testsuite/20_util/hash/chi2_q_bit_string_set.cc +++ b/libstdc++-v3/testsuite/20_util/hash/chi2_q_bit_string_set.cc @@ -27,7 +27,6 @@ void test_bit_string_set() { - bool test __attribute__((unused)) = true; const unsigned long N = SAMPLES; const unsigned long k = N/100; std::vector set; diff --git a/libstdc++-v3/testsuite/20_util/hash/chi2_q_document_words.cc b/libstdc++-v3/testsuite/20_util/hash/chi2_q_document_words.cc index fae7bde71f8..56cca2d142e 100644 --- a/libstdc++-v3/testsuite/20_util/hash/chi2_q_document_words.cc +++ b/libstdc++-v3/testsuite/20_util/hash/chi2_q_document_words.cc @@ -25,7 +25,6 @@ void test_document_words() { - bool test __attribute__((unused)) = true; const std::string f_name = "thirty_years_among_the_dead_preproc.txt"; std::ifstream in(f_name); VERIFY( in.is_open() ); diff --git a/libstdc++-v3/testsuite/20_util/hash/chi2_q_numeric_pattern_set.cc b/libstdc++-v3/testsuite/20_util/hash/chi2_q_numeric_pattern_set.cc index e4ff66edd3d..697ddec2ed6 100644 --- a/libstdc++-v3/testsuite/20_util/hash/chi2_q_numeric_pattern_set.cc +++ b/libstdc++-v3/testsuite/20_util/hash/chi2_q_numeric_pattern_set.cc @@ -27,7 +27,6 @@ void test_numeric_pattern_set() { - bool test __attribute__((unused)) = true; const unsigned long N = SAMPLES; const unsigned long k = N/100; std::vector set; diff --git a/libstdc++-v3/testsuite/20_util/hash/chi2_q_uniform_random.cc b/libstdc++-v3/testsuite/20_util/hash/chi2_q_uniform_random.cc index 075f1cd4bba..959070abe02 100644 --- a/libstdc++-v3/testsuite/20_util/hash/chi2_q_uniform_random.cc +++ b/libstdc++-v3/testsuite/20_util/hash/chi2_q_uniform_random.cc @@ -26,7 +26,6 @@ void test_uniform_random() { - bool test __attribute__((unused)) = true; std::srand(137); std::unordered_set set; std::string s; diff --git a/libstdc++-v3/testsuite/20_util/hash/operators/size_t.cc b/libstdc++-v3/testsuite/20_util/hash/operators/size_t.cc index e82d962678d..06b8a7387ff 100644 --- a/libstdc++-v3/testsuite/20_util/hash/operators/size_t.cc +++ b/libstdc++-v3/testsuite/20_util/hash/operators/size_t.cc @@ -26,8 +26,6 @@ template void do_test() { - bool test __attribute__((unused)) = true; - typedef T value_type; typedef std::hash hash_type; using std::size_t; diff --git a/libstdc++-v3/testsuite/20_util/hash/quality.cc b/libstdc++-v3/testsuite/20_util/hash/quality.cc index 63b6e2bd479..014788ccc52 100644 --- a/libstdc++-v3/testsuite/20_util/hash/quality.cc +++ b/libstdc++-v3/testsuite/20_util/hash/quality.cc @@ -59,7 +59,6 @@ random_strings(unsigned int n, unsigned int len) double score_from_varying_position(string s, unsigned int index) { - bool test __attribute__((unused)) = true; unsigned int bits_in_hash_code = sizeof(size_t) * 8; // We'll iterate through all 256 vals for s[index], leaving the rest @@ -146,7 +145,6 @@ quality_test(unsigned int num_strings, unsigned int string_size) void quality_test() { - bool test __attribute__((unused)) = true; srand(137); double sum_of_scores = 0; for (unsigned int i = 0; i < num_quality_tests; i++) diff --git a/libstdc++-v3/testsuite/20_util/integral_constant/static_definition.cc b/libstdc++-v3/testsuite/20_util/integral_constant/static_definition.cc index 58ae045917e..f3fa280c0a8 100644 --- a/libstdc++-v3/testsuite/20_util/integral_constant/static_definition.cc +++ b/libstdc++-v3/testsuite/20_util/integral_constant/static_definition.cc @@ -22,7 +22,6 @@ void test01() { - bool test __attribute__((unused)) = true; const bool* p = &std::integral_constant::value; VERIFY( p ); } diff --git a/libstdc++-v3/testsuite/20_util/integral_constant/true_false_value.cc b/libstdc++-v3/testsuite/20_util/integral_constant/true_false_value.cc index 53866139d7c..bf9e324ac6d 100644 --- a/libstdc++-v3/testsuite/20_util/integral_constant/true_false_value.cc +++ b/libstdc++-v3/testsuite/20_util/integral_constant/true_false_value.cc @@ -22,7 +22,6 @@ void test01() { - bool test __attribute__((unused)) = true; using std::true_type; using std::false_type; diff --git a/libstdc++-v3/testsuite/20_util/is_function/24808.cc b/libstdc++-v3/testsuite/20_util/is_function/24808.cc index eeec1ecc675..066b7001d02 100644 --- a/libstdc++-v3/testsuite/20_util/is_function/24808.cc +++ b/libstdc++-v3/testsuite/20_util/is_function/24808.cc @@ -24,7 +24,6 @@ // libstdc++/24808 void test01() { - bool test __attribute__((unused)) = true; using std::is_function; using namespace __gnu_test; diff --git a/libstdc++-v3/testsuite/20_util/is_object/24808.cc b/libstdc++-v3/testsuite/20_util/is_object/24808.cc index f209ca2769f..77bb69e28b7 100644 --- a/libstdc++-v3/testsuite/20_util/is_object/24808.cc +++ b/libstdc++-v3/testsuite/20_util/is_object/24808.cc @@ -24,7 +24,6 @@ // libstdc++/24808 void test01() { - bool test __attribute__((unused)) = true; using std::is_object; using namespace __gnu_test; diff --git a/libstdc++-v3/testsuite/20_util/move_if_noexcept/1.cc b/libstdc++-v3/testsuite/20_util/move_if_noexcept/1.cc index 36b170ffc3e..7da691901cc 100644 --- a/libstdc++-v3/testsuite/20_util/move_if_noexcept/1.cc +++ b/libstdc++-v3/testsuite/20_util/move_if_noexcept/1.cc @@ -93,8 +93,6 @@ private: void test01() { - bool test __attribute__((unused)) = true; - noexcept_move_copy nemc1; auto nemc2 __attribute__((unused)) = std::move_if_noexcept(nemc1); VERIFY( nemc1 == false ); diff --git a/libstdc++-v3/testsuite/20_util/move_if_noexcept/constexpr.cc b/libstdc++-v3/testsuite/20_util/move_if_noexcept/constexpr.cc index b12d8f95bea..a9a9ebf80fb 100644 --- a/libstdc++-v3/testsuite/20_util/move_if_noexcept/constexpr.cc +++ b/libstdc++-v3/testsuite/20_util/move_if_noexcept/constexpr.cc @@ -28,8 +28,6 @@ struct simple void test01() { - bool test __attribute__((unused)) = true; - constexpr simple s { 5 }; constexpr auto s2 __attribute__((unused)) = std::move_if_noexcept(s); } diff --git a/libstdc++-v3/testsuite/20_util/owner_less/cmp.cc b/libstdc++-v3/testsuite/20_util/owner_less/cmp.cc index 552eb92cd8b..8fdc4ad3372 100644 --- a/libstdc++-v3/testsuite/20_util/owner_less/cmp.cc +++ b/libstdc++-v3/testsuite/20_util/owner_less/cmp.cc @@ -32,8 +32,6 @@ struct B { A a[2]; }; int test01() { - bool test __attribute__((unused)) = true; - // test empty shared_ptrs compare equivalent std::owner_less> less; std::owner_less> wless; @@ -51,8 +49,6 @@ test01() int test02() { - bool test __attribute__((unused)) = true; - std::owner_less> less; std::owner_less> wless; @@ -84,8 +80,6 @@ test02() int test03() { - bool test __attribute__((unused)) = true; - std::owner_less> less; std::owner_less> wless; @@ -108,8 +102,6 @@ test03() int test04() { - bool test __attribute__((unused)) = true; - std::owner_less> less; std::shared_ptr a[3]; diff --git a/libstdc++-v3/testsuite/20_util/pair/1.cc b/libstdc++-v3/testsuite/20_util/pair/1.cc index ddafd1a3665..caae3eac418 100644 --- a/libstdc++-v3/testsuite/20_util/pair/1.cc +++ b/libstdc++-v3/testsuite/20_util/pair/1.cc @@ -45,8 +45,6 @@ template // heterogeneous void test01() { - bool test __attribute__((unused)) = true; - std::pair p_bl_1(true, 433); std::pair p_bl_2 = std::make_pair(true, 433); VERIFY( p_bl_1 == p_bl_2 ); diff --git a/libstdc++-v3/testsuite/20_util/pair/2.cc b/libstdc++-v3/testsuite/20_util/pair/2.cc index 1cc13982319..dac378eebba 100644 --- a/libstdc++-v3/testsuite/20_util/pair/2.cc +++ b/libstdc++-v3/testsuite/20_util/pair/2.cc @@ -44,8 +44,6 @@ template // homogeneous void test02() { - bool test __attribute__((unused)) = true; - std::pair p_bb_1(true, false); std::pair p_bb_2 = std::make_pair(true, false); VERIFY( p_bb_1 == p_bb_2 ); diff --git a/libstdc++-v3/testsuite/20_util/pair/3.cc b/libstdc++-v3/testsuite/20_util/pair/3.cc index 3bb61aa69fd..7cfc474c9b2 100644 --- a/libstdc++-v3/testsuite/20_util/pair/3.cc +++ b/libstdc++-v3/testsuite/20_util/pair/3.cc @@ -45,8 +45,6 @@ template // const void test03() { - bool test __attribute__((unused)) = true; - const std::pair p_bl_1(true, 433); const std::pair p_bl_2 = std::make_pair(true, 433); VERIFY( p_bl_1 == p_bl_2 ); diff --git a/libstdc++-v3/testsuite/20_util/pair/4.cc b/libstdc++-v3/testsuite/20_util/pair/4.cc index e40ea1c821c..0e1fbcd2e88 100644 --- a/libstdc++-v3/testsuite/20_util/pair/4.cc +++ b/libstdc++-v3/testsuite/20_util/pair/4.cc @@ -44,7 +44,6 @@ template // const& void test04() { - bool test __attribute__((unused)) = true; const gnu_obj& obj1 = gnu_obj(5); const std::pair p_sg_1("enlightenment", obj1); const std::pair p_sg_2 = diff --git a/libstdc++-v3/testsuite/20_util/pair/make_pair/constexpr.cc b/libstdc++-v3/testsuite/20_util/pair/make_pair/constexpr.cc index b110e26e452..1195db7eeb2 100644 --- a/libstdc++-v3/testsuite/20_util/pair/make_pair/constexpr.cc +++ b/libstdc++-v3/testsuite/20_util/pair/make_pair/constexpr.cc @@ -27,7 +27,6 @@ void test1() { - bool test __attribute__((unused)) = true; typedef std::pair pair_type; constexpr pair_type p1 __attribute__((unused)) = std::make_pair(22, 22.222); } diff --git a/libstdc++-v3/testsuite/20_util/pair/moveable.cc b/libstdc++-v3/testsuite/20_util/pair/moveable.cc index ecc8eb93e51..9c26f278567 100644 --- a/libstdc++-v3/testsuite/20_util/pair/moveable.cc +++ b/libstdc++-v3/testsuite/20_util/pair/moveable.cc @@ -26,8 +26,6 @@ #include #include -bool test __attribute__((unused)) = true; - void test1() { diff --git a/libstdc++-v3/testsuite/20_util/pair/piecewise.cc b/libstdc++-v3/testsuite/20_util/pair/piecewise.cc index 894e0697e74..854b6dea207 100644 --- a/libstdc++-v3/testsuite/20_util/pair/piecewise.cc +++ b/libstdc++-v3/testsuite/20_util/pair/piecewise.cc @@ -67,8 +67,6 @@ private: void test01() { - bool test __attribute__((unused)) = true; - std::pair pp0(std::piecewise_construct, std::forward_as_tuple(-3), std::forward_as_tuple()); diff --git a/libstdc++-v3/testsuite/20_util/pair/swap.cc b/libstdc++-v3/testsuite/20_util/pair/swap.cc index 5a18f2511b5..024fff1825f 100644 --- a/libstdc++-v3/testsuite/20_util/pair/swap.cc +++ b/libstdc++-v3/testsuite/20_util/pair/swap.cc @@ -24,7 +24,6 @@ void test01() { - bool test __attribute__((unused)) = true; typedef __gnu_test::uneq_allocator ua_type; ua_type one(1), two(2); diff --git a/libstdc++-v3/testsuite/20_util/ratio/comparisons/comp1.cc b/libstdc++-v3/testsuite/20_util/ratio/comparisons/comp1.cc index b86296eea37..74dcf35cab9 100644 --- a/libstdc++-v3/testsuite/20_util/ratio/comparisons/comp1.cc +++ b/libstdc++-v3/testsuite/20_util/ratio/comparisons/comp1.cc @@ -24,8 +24,6 @@ void test01() { - bool test __attribute__((unused)) = true; - VERIFY(( std::ratio_equal, std::ratio<1,3>>::value == 1 )); VERIFY(( std::ratio_equal, std::ratio<1,4>>::value == 0 )); @@ -38,8 +36,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; - VERIFY( (std::ratio_less, std::ratio<1,3>>::value == 1) ); VERIFY( (std::ratio_less, std::ratio<1,3>>::value == 1) ); diff --git a/libstdc++-v3/testsuite/20_util/ratio/comparisons/comp2.cc b/libstdc++-v3/testsuite/20_util/ratio/comparisons/comp2.cc index 5c5412eba1d..bed70cbc6a6 100644 --- a/libstdc++-v3/testsuite/20_util/ratio/comparisons/comp2.cc +++ b/libstdc++-v3/testsuite/20_util/ratio/comparisons/comp2.cc @@ -26,8 +26,6 @@ static const std::intmax_t M = INTMAX_MAX; void test01() { - bool test __attribute__((unused)) = true; - // No overflow with same denominator VERIFY( (std::ratio_less, std::ratio>::value == 1) ); diff --git a/libstdc++-v3/testsuite/20_util/ratio/comparisons/comp3.cc b/libstdc++-v3/testsuite/20_util/ratio/comparisons/comp3.cc index 2c1c32b4836..8c6cd980667 100644 --- a/libstdc++-v3/testsuite/20_util/ratio/comparisons/comp3.cc +++ b/libstdc++-v3/testsuite/20_util/ratio/comparisons/comp3.cc @@ -26,8 +26,6 @@ void test01() { - bool test __attribute__((unused)) = true; - VERIFY( (std::ratio_less, std::ratio<59, 29129>>::value == 1) ); VERIFY( (std::ratio_less, diff --git a/libstdc++-v3/testsuite/20_util/ratio/cons/cons1.cc b/libstdc++-v3/testsuite/20_util/ratio/cons/cons1.cc index 02a40d0b223..9ef1c3858c7 100644 --- a/libstdc++-v3/testsuite/20_util/ratio/cons/cons1.cc +++ b/libstdc++-v3/testsuite/20_util/ratio/cons/cons1.cc @@ -26,8 +26,6 @@ void test01() { - bool test __attribute__((unused)) = true; - std::ratio<1,3> r0; std::ratio<2,6> r1; std::ratio<2,-6> r2; diff --git a/libstdc++-v3/testsuite/20_util/ratio/operations/45866.cc b/libstdc++-v3/testsuite/20_util/ratio/operations/45866.cc index 48630d31049..c8bf8401636 100644 --- a/libstdc++-v3/testsuite/20_util/ratio/operations/45866.cc +++ b/libstdc++-v3/testsuite/20_util/ratio/operations/45866.cc @@ -26,8 +26,6 @@ // libstdc++/45866 void test01() { - bool test __attribute__((unused)) = true; - typedef std::ratio<1, 4>::type r_type1; typedef std::ratio<3, 2>::type r_type2; diff --git a/libstdc++-v3/testsuite/20_util/ratio/operations/47913.cc b/libstdc++-v3/testsuite/20_util/ratio/operations/47913.cc index 75f58a772ae..8c5254cfecc 100644 --- a/libstdc++-v3/testsuite/20_util/ratio/operations/47913.cc +++ b/libstdc++-v3/testsuite/20_util/ratio/operations/47913.cc @@ -25,7 +25,6 @@ // libstdc++/47913 void test01() { - bool test __attribute__((unused)) = true; using namespace std; const intmax_t m1 = (intmax_t)1 << (4 * sizeof(intmax_t) - 1); diff --git a/libstdc++-v3/testsuite/20_util/ratio/operations/ops1.cc b/libstdc++-v3/testsuite/20_util/ratio/operations/ops1.cc index cb0b31179cc..32072fe8359 100644 --- a/libstdc++-v3/testsuite/20_util/ratio/operations/ops1.cc +++ b/libstdc++-v3/testsuite/20_util/ratio/operations/ops1.cc @@ -26,8 +26,6 @@ void test01() { - bool test __attribute__((unused)) = true; - std::ratio_add, std::ratio<5,12>>::type r; VERIFY( r.num == 19 ); @@ -37,7 +35,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; std::ratio_subtract, std::ratio<5,12>>::type r; VERIFY( r.num == -1 ); @@ -47,7 +44,6 @@ test02() void test03() { - bool test __attribute__((unused)) = true; std::ratio_multiply, std::ratio<5,12>>::type r; VERIFY( r.num == 5 ); @@ -57,7 +53,6 @@ test03() void test04() { - bool test __attribute__((unused)) = true; std::ratio_divide, std::ratio<5,12>>::type r; VERIFY( r.num == 9 ); diff --git a/libstdc++-v3/testsuite/20_util/ratio/operations/ops2.cc b/libstdc++-v3/testsuite/20_util/ratio/operations/ops2.cc index 6bf7bf6600c..8172c77a00d 100644 --- a/libstdc++-v3/testsuite/20_util/ratio/operations/ops2.cc +++ b/libstdc++-v3/testsuite/20_util/ratio/operations/ops2.cc @@ -31,8 +31,6 @@ typedef std::ratio max_over_two; void test01() { - bool test __attribute__((unused)) = true; - std::ratio_add::type r1; VERIFY( r1.num == two_over_max::num); @@ -48,9 +46,7 @@ test01() void test02() -{ - bool test __attribute__((unused)) = true; - +{ std::ratio_subtract::type r1; VERIFY( r1.num == 0); diff --git a/libstdc++-v3/testsuite/20_util/ratio/operations/ops3.cc b/libstdc++-v3/testsuite/20_util/ratio/operations/ops3.cc index 8b8a0648e5d..39ba67aa058 100644 --- a/libstdc++-v3/testsuite/20_util/ratio/operations/ops3.cc +++ b/libstdc++-v3/testsuite/20_util/ratio/operations/ops3.cc @@ -26,8 +26,6 @@ void test01() { - bool test __attribute__((unused)) = true; - std::ratio_multiply< std::ratio<2, INTMAX_MAX>, std::ratio>::type r1; @@ -45,9 +43,7 @@ test01() void test02() -{ - bool test __attribute__((unused)) = true; - +{ std::ratio_divide< std::ratio, std::ratio>::type r1; diff --git a/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc b/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc index e5c02ca926b..b4a1eec7efd 100644 --- a/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc +++ b/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc @@ -24,8 +24,6 @@ using namespace __gnu_test; -bool test __attribute__((unused)) = true; - struct X { typedef int result_type; diff --git a/libstdc++-v3/testsuite/20_util/scoped_allocator/1.cc b/libstdc++-v3/testsuite/20_util/scoped_allocator/1.cc index e101fc5a4b3..f380f99652d 100644 --- a/libstdc++-v3/testsuite/20_util/scoped_allocator/1.cc +++ b/libstdc++-v3/testsuite/20_util/scoped_allocator/1.cc @@ -44,8 +44,6 @@ struct Element void test01() { - bool test __attribute((unused)) = false; - typedef std::scoped_allocator_adaptor alloc1_type; typedef std::vector EltVec; @@ -59,8 +57,6 @@ void test01() void test02() { - bool test __attribute((unused)) = false; - typedef std::scoped_allocator_adaptor inner_alloc_type; typedef std::vector EltVec; diff --git a/libstdc++-v3/testsuite/20_util/scoped_allocator/2.cc b/libstdc++-v3/testsuite/20_util/scoped_allocator/2.cc index 58b192f1df3..0ef5d7efacb 100644 --- a/libstdc++-v3/testsuite/20_util/scoped_allocator/2.cc +++ b/libstdc++-v3/testsuite/20_util/scoped_allocator/2.cc @@ -120,8 +120,6 @@ template void test_def() { - bool test __attribute((unused)) = false; - typedef std::pair test_type; typedef uneq_allocator alloc_type; typedef scoped_allocator_adaptor alloc_adaptor; @@ -167,8 +165,6 @@ template void test_copying() { - bool test __attribute((unused)) = false; - typedef std::pair test_type; typedef uneq_allocator alloc_type; typedef scoped_allocator_adaptor alloc_adaptor; @@ -218,8 +214,6 @@ template void test_moving() { - bool test __attribute((unused)) = false; - typedef std::pair test_type; typedef uneq_allocator alloc_type; typedef scoped_allocator_adaptor alloc_adaptor; diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/assign.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/assign.cc index 7139f207daf..7eaa33712af 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/assign.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/assign.cc @@ -49,7 +49,6 @@ void test01() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::shared_ptr a; diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr.cc index d29bd36089f..105fe1103ab 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr.cc @@ -63,7 +63,6 @@ int test01() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::shared_ptr a(new A); std::auto_ptr b(new B); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc index b0a6394ab7a..56d818ec10a 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc @@ -32,8 +32,6 @@ struct B { }; int test01() { - bool test __attribute__((unused)) = true; - std::shared_ptr a; std::auto_ptr b; a = std::move(b); // { dg-error "here" } diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/move.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/move.cc index b2a95c4e890..cef25707da7 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/move.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/move.cc @@ -62,7 +62,6 @@ void test01() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::shared_ptr a1; std::shared_ptr a2(new A); @@ -86,7 +85,6 @@ void test02() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::shared_ptr a; std::shared_ptr b(new B); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/shared_ptr.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/shared_ptr.cc index ed97538e887..5d63029140b 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/shared_ptr.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/shared_ptr.cc @@ -62,7 +62,6 @@ void test01() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::shared_ptr a; diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/unique_ptr_lvalue_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/unique_ptr_lvalue_neg.cc index 1527e00ea5a..46e3bf5a0f4 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/unique_ptr_lvalue_neg.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/unique_ptr_lvalue_neg.cc @@ -30,8 +30,6 @@ struct A { }; int test01() { - bool test __attribute__((unused)) = true; - std::shared_ptr a; std::unique_ptr u; a = u; // { dg-error "" } diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/comparison/cmp.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/comparison/cmp.cc index 39aba41a663..2eaef29d527 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/comparison/cmp.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/comparison/cmp.cc @@ -36,8 +36,6 @@ struct B : A int test01() { - bool test __attribute__((unused)) = true; - // test empty shared_ptrs compare equivalent std::shared_ptr p1; std::shared_ptr p2; @@ -52,8 +50,6 @@ test01() int test02() { - bool test __attribute__((unused)) = true; - std::shared_ptr A_default; std::shared_ptr A_from_A(new A); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/comparison/less.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/comparison/less.cc index f60b7aeed1a..6c55d74967c 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/comparison/less.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/comparison/less.cc @@ -41,8 +41,6 @@ namespace std int test01() { - bool test __attribute__((unused)) = true; - std::less> less; // test empty shared_ptrs compare equivalent std::shared_ptr p1; @@ -57,8 +55,6 @@ test01() int test02() { - bool test __attribute__((unused)) = true; - std::less> less; std::shared_ptr empty; @@ -81,8 +77,6 @@ test02() int test03() { - bool test __attribute__((unused)) = true; - std::less> less; A a; diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/alias.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/alias.cc index a881035d67a..482a5bb262e 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/alias.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/alias.cc @@ -44,7 +44,7 @@ void deletefunc(A* p) { delete p; } int test01() { - bool test __attribute__((unused)) = true; + bool test = true; std::shared_ptr a; std::shared_ptr b1(a, &test); @@ -62,8 +62,6 @@ int test01() int test02() { - bool test __attribute__((unused)) = true; - std::shared_ptr a(new A); std::shared_ptr i1(a, &a->i); VERIFY( i1.use_count() == 2 ); @@ -78,8 +76,6 @@ test02() int test03() { - bool test __attribute__((unused)) = true; - std::shared_ptr b(new B); std::shared_ptr a1(b, b.get()); std::shared_ptr a2(b, &b->a); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/alloc.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/alloc.cc index 51570f1fb99..7c480b69dc5 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/alloc.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/alloc.cc @@ -41,7 +41,6 @@ long D::delete_count = 0; int test01() { - bool test __attribute__((unused)) = true; tracker_allocator_counter::reset(); std::shared_ptr p1(new A, deletefunc, tracker_allocator()); @@ -68,7 +67,6 @@ test01() int test02() { - bool test __attribute__((unused)) = true; tracker_allocator_counter::reset(); std::shared_ptr p1(new A, deletefunc, tracker_allocator()); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/auto_ptr.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/auto_ptr.cc index 3eaf07698ff..7a99490bcac 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/auto_ptr.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/auto_ptr.cc @@ -31,8 +31,6 @@ struct A { }; int test01() { - bool test __attribute__((unused)) = true; - std::auto_ptr a(new A); std::shared_ptr a2(std::move(a)); VERIFY( a.get() == 0 ); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/copy.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/copy.cc index 2be1ad5c232..09d18110355 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/copy.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/copy.cc @@ -61,7 +61,6 @@ struct reset_count_struct int test01() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::shared_ptr a1; std::shared_ptr a2(a1); @@ -78,7 +77,6 @@ int test02() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::shared_ptr a1(new A); std::shared_ptr a2(a1); @@ -95,7 +93,6 @@ int test03() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::shared_ptr b(new B); std::shared_ptr a(b); @@ -112,7 +109,6 @@ int test04() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::shared_ptr b(new B, &deleter); std::shared_ptr a(b); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/default.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/default.cc index bb53e1c072f..262674e6082 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/default.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/default.cc @@ -30,8 +30,6 @@ struct A { }; int test01() { - bool test __attribute__((unused)) = true; - std::shared_ptr a; VERIFY( a.get() == 0 ); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/move.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/move.cc index 77295bc69e1..26786d60170 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/move.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/move.cc @@ -68,7 +68,6 @@ struct reset_count_struct int test01() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::shared_ptr a1; std::shared_ptr a2(std::move(a1)); @@ -86,7 +85,6 @@ int test02() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::shared_ptr a1(new A); std::shared_ptr a2(std::move(a1)); @@ -102,7 +100,6 @@ int test03() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::shared_ptr b(new B); std::shared_ptr a(std::move(b)); @@ -120,7 +117,6 @@ int test04() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::shared_ptr b(new B, D()); std::shared_ptr a(std::move(b)); @@ -142,7 +138,6 @@ int test05() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::shared_ptr a(std::move(std::shared_ptr(new A))); VERIFY( a.use_count() == 1 ); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/nullptr.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/nullptr.cc index 5af8c388495..593fc48f6c8 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/nullptr.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/nullptr.cc @@ -39,8 +39,6 @@ struct deleter void test01() { - bool test __attribute__((unused)) = true; - std::shared_ptr p = nullptr; VERIFY( p.get() == nullptr ); VERIFY( p.use_count() == 0 ); @@ -50,8 +48,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; - deleter d; std::shared_ptr p(nullptr, std::ref(d)); VERIFY( p.get() == nullptr ); @@ -66,8 +62,6 @@ test02() void test03() { - bool test __attribute__((unused)) = true; - deleter d; __gnu_test::tracker_allocator a; std::shared_ptr p(nullptr, std::ref(d), a); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/pointer.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/pointer.cc index fa4bb369b87..c8d11bd422a 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/pointer.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/pointer.cc @@ -33,8 +33,6 @@ struct B : A { }; int test01() { - bool test __attribute__((unused)) = true; - A * const a = 0; std::shared_ptr p(a); VERIFY( p.get() == 0 ); @@ -46,8 +44,6 @@ test01() int test02() { - bool test __attribute__((unused)) = true; - A * const a = new A; std::shared_ptr p(a); VERIFY( p.get() == a ); @@ -60,8 +56,6 @@ test02() int test03() { - bool test __attribute__((unused)) = true; - B * const b = new B; std::shared_ptr p(b); VERIFY( p.get() == b ); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr.cc index 58335c3a299..18e66162754 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr.cc @@ -30,8 +30,6 @@ struct A { }; int test01() { - bool test __attribute__((unused)) = true; - std::unique_ptr up(new A); std::shared_ptr sp(std::move(up)); VERIFY( up.get() == 0 ); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_array.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_array.cc index d01f38cfa53..72eed477c8f 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_array.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_array.cc @@ -35,8 +35,6 @@ struct A : std::enable_shared_from_this int test01() { - bool test __attribute__((unused)) = true; - std::unique_ptr up(new A[2]); std::shared_ptr sp(std::move(up)); VERIFY( up.get() == 0 ); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc index 73f9c23716d..d773d23f7af 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc @@ -37,8 +37,6 @@ int D::count = 0; void test01() { - bool test __attribute__((unused)) = true; - std::unique_ptr up(new A, D()); { std::shared_ptr sp(std::move(up)); @@ -52,8 +50,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; - D::count = 0; std::unique_ptr up; { diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_1.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_1.cc index 49629a2610a..702daeb4295 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_1.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_1.cc @@ -37,8 +37,6 @@ struct D { int test01() { - bool test __attribute__((unused)) = true; - D d = D(); std::unique_ptr up(new A, d); { diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_2.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_2.cc index c15caf7b543..f29a4b766a7 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_2.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_2.cc @@ -39,8 +39,6 @@ struct D { int test01() { - bool test __attribute__((unused)) = true; - D d; std::unique_ptr p1(new A, d); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_neg.cc index 2a0ac70f59a..5a28de6d098 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_neg.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/unique_ptr_neg.cc @@ -30,8 +30,6 @@ struct A { }; int test01() { - bool test __attribute__((unused)) = true; - std::unique_ptr a; std::shared_ptr p(a); // { dg-error "" } diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr.cc index a6717984b5f..c0cc05f5f58 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr.cc @@ -30,8 +30,6 @@ struct A { }; int test01() { - bool test __attribute__((unused)) = true; - A * const a = new A; std::shared_ptr a1(a); std::weak_ptr wa(a1); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc index e0f761b2adb..d7d4763048a 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc @@ -56,7 +56,6 @@ struct reset_count_struct void test01() { - bool test __attribute__((unused)) = true; reset_count_struct __attribute__((unused)) reset; { @@ -74,7 +73,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; reset_count_struct __attribute__((unused)) reset; std::shared_ptr p1; diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr402.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr402.cc index 9f12affd5a4..425bd276496 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr402.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr402.cc @@ -21,12 +21,11 @@ #include #include -#include struct A { - void* operator new(size_t n) { return new char[sizeof(A)]; } - void operator delete(void* p, size_t) { delete (char*)p; } + void* operator new(size_t n) { return new char[sizeof(A)]; } + void operator delete(void* p, size_t) { delete (char*)p; } }; // 20.6.6.2.6 shared_ptr creation [util.smartptr.shared.create] @@ -34,8 +33,6 @@ struct A void test01() { - bool test __attribute__((unused)) = true; - std::shared_ptr p = std::make_shared(); } diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr925.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr925.cc index 18593161f84..75302ca5fb0 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr925.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr925.cc @@ -42,8 +42,6 @@ create_auto_ptr() void process(std::shared_ptr a) { - bool test __attribute__((unused)) = true; - VERIFY( a.get() != 0 ); VERIFY( a.use_count() == 1 ); } diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/make.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/make.cc index 3a0e00b70fa..79259ce3230 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/make.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/make.cc @@ -51,7 +51,6 @@ struct reset_count_struct void test01() { - bool test __attribute__((unused)) = true; reset_count_struct __attribute__((unused)) reset; { @@ -66,7 +65,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; reset_count_struct __attribute__((unused)) reset; std::shared_ptr p1; diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/dest/dest.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/dest/dest.cc index bd682dcf7d0..9a2ef65b93b 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/dest/dest.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/dest/dest.cc @@ -69,7 +69,6 @@ int test01() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; { std::shared_ptr a; @@ -88,7 +87,6 @@ int test02() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::shared_ptr a; { @@ -108,7 +106,6 @@ int test03() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; { std::shared_ptr a1(new B); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/hash/1.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/hash/1.cc index 525bc1f0389..66b3d651fdc 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/hash/1.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/hash/1.cc @@ -24,8 +24,6 @@ void test01() { - bool test __attribute__((unused)) = true; - struct T { }; std::shared_ptr s0(new T); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/misc/24595.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/misc/24595.cc index 90090f132a0..174014074d0 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/misc/24595.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/misc/24595.cc @@ -27,8 +27,6 @@ using std::get_deleter; // libstdc++/24595 void test01() { - bool test __attribute__((unused)) = true; - std::shared_ptr sp; VERIFY( !get_deleter(sp) ); } diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/misc/42019.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/misc/42019.cc index 242e2b79b39..e6633d1a285 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/misc/42019.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/misc/42019.cc @@ -34,8 +34,6 @@ struct B { void test01() { - bool test __attribute__((unused)) = true; - std::shared_ptr spA = std::make_shared(); VERIFY( spA.get() != 0 ); @@ -43,8 +41,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; - std::shared_ptr spB = std::make_shared(99); VERIFY( spB->i == 99 ); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/misc/io.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/misc/io.cc index d30b9010343..7e2e4db1346 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/misc/io.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/misc/io.cc @@ -31,8 +31,6 @@ struct A { }; int test01() { - bool test __attribute__((unused)) = true; - std::shared_ptr p(new A); std::ostringstream buf; buf << p; diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/misc/swap.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/misc/swap.cc index 35fe12dac45..de26276aea2 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/misc/swap.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/misc/swap.cc @@ -30,8 +30,6 @@ struct A { }; int test01() { - bool test __attribute__((unused)) = true; - A * const a1 = new A; A * const a2 = new A; std::shared_ptr p1(a1); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset.cc index 550e28bd7cd..d80314ec319 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset.cc @@ -37,8 +37,6 @@ long D::delete_count = 0; int test01() { - bool test __attribute__((unused)) = true; - A * const a = new A; std::shared_ptr p1(a); std::shared_ptr p2(p1); @@ -52,8 +50,6 @@ test01() int test02() { - bool test __attribute__((unused)) = true; - A * const a = new A; B * const b = new B; std::shared_ptr p1(a); @@ -68,8 +64,6 @@ test02() int test03() { - bool test __attribute__((unused)) = true; - { std::shared_ptr p1; p1.reset(new B, D()); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc index 6e754c893ca..46aefceffe6 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc @@ -41,7 +41,6 @@ long D::delete_count = 0; int test01() { - bool test __attribute__((unused)) = true; tracker_allocator_counter::reset(); { diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset_neg.cc index e28a966c8ea..0b31282ef66 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset_neg.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/reset_neg.cc @@ -30,8 +30,6 @@ struct A { }; int test01() { - bool test __attribute__((unused)) = true; - const std::shared_ptr p1(new A); p1.reset(); // { dg-error "" } diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap.cc index e47cc676305..f84a3da8cd6 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap.cc @@ -30,8 +30,6 @@ struct A { }; int test01() { - bool test __attribute__((unused)) = true; - A * const a1 = new A; A * const a2 = new A; std::shared_ptr p1(a1); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap_neg.cc index c1b8cb26de4..935582f6f19 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap_neg.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/modifiers/swap_neg.cc @@ -30,8 +30,6 @@ struct A { }; int test01() { - bool test __attribute__((unused)) = true; - const std::shared_ptr p1(new A); std::shared_ptr p2(new A); p1.swap(p2); // { dg-error "discards qualifiers" } diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/observers/bool_conv.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/bool_conv.cc index 4f4a1da4d72..d6e52b9964a 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/observers/bool_conv.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/bool_conv.cc @@ -30,8 +30,6 @@ struct A { }; void test01() { - bool test __attribute__((unused)) = true; - const std::shared_ptr p1; VERIFY( static_cast(p1) == false ); const std::shared_ptr p2(p1); @@ -41,8 +39,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; - std::shared_ptr p1(new A); VERIFY( static_cast(p1) ); std::shared_ptr p2(p1); @@ -55,8 +51,6 @@ test02() void test03() { - bool test __attribute__((unused)) = true; - std::shared_ptr p1(new A); std::shared_ptr p2(p1); p2.reset(new A); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/observers/get.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/get.cc index 266727a9c82..966614e500e 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/observers/get.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/get.cc @@ -34,8 +34,6 @@ struct A void test01() { - bool test __attribute__((unused)) = true; - A * const a = new A; const std::shared_ptr p(a); VERIFY( p.get() == a ); @@ -45,8 +43,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; - A * const a = new A; const std::shared_ptr p(a); VERIFY( &*p == a ); @@ -56,8 +52,6 @@ test02() void test03() { - bool test __attribute__((unused)) = true; - A * const a = new A; const std::shared_ptr p(a); VERIFY( &p->i == &a->i ); @@ -66,8 +60,6 @@ test03() void test04() { - bool test __attribute__((unused)) = true; - #if !(defined _GLIBCXX_DEBUG && defined _GLIBCXX_DEBUG_PEDANTIC) std::shared_ptr p; auto np = p.operator->(); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/observers/owner_before.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/owner_before.cc index 0874a00f27a..eb88ae0e1bb 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/observers/owner_before.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/owner_before.cc @@ -37,8 +37,6 @@ struct B : A void test01() { - bool test __attribute__((unused)) = true; - // test empty shared_ptrs compare equivalent std::shared_ptr p1; std::shared_ptr p2; @@ -50,8 +48,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; - std::shared_ptr a0; std::shared_ptr a1(new A); @@ -77,8 +73,6 @@ test02() void test03() { - bool test __attribute__((unused)) = true; - std::shared_ptr p1(new A()); std::shared_ptr p2(p1, &p1->i); VERIFY( !p1.owner_before(p2) && !p2.owner_before(p1) ); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/observers/unique.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/unique.cc index a57cc085139..a12ee3caa41 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/observers/unique.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/unique.cc @@ -30,8 +30,6 @@ struct A { }; void test01() { - bool test __attribute__((unused)) = true; - const std::shared_ptr p1; VERIFY( !p1.unique() ); const std::shared_ptr p2(p1); @@ -41,8 +39,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; - std::shared_ptr p1(new A); VERIFY( p1.unique() ); std::shared_ptr p2(p1); @@ -55,8 +51,6 @@ test02() void test03() { - bool test __attribute__((unused)) = true; - std::shared_ptr p1(new A); std::shared_ptr p2(p1); p2.reset(new A); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/observers/use_count.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/use_count.cc index 10f5ab31fe9..c022a5a11bc 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/observers/use_count.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/observers/use_count.cc @@ -31,8 +31,6 @@ struct B : A { }; void test01() { - bool test __attribute__((unused)) = true; - const std::shared_ptr p1; VERIFY( p1.use_count() == 0 ); const std::shared_ptr p2(p1); @@ -42,8 +40,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; - std::shared_ptr p1(new A); std::shared_ptr p2(p1); p1.reset(); @@ -54,8 +50,6 @@ test02() void test03() { - bool test __attribute__((unused)) = true; - std::shared_ptr p1(new A); std::shared_ptr p2(p1); p2.reset(new B); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc index 67084960323..5014898b2b9 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc @@ -124,7 +124,6 @@ void thread_hammer(wp_vector_t& weak_pool) void test01() { - bool test __attribute__((unused)) = true; sp_vector_t obj_pool(POOL_SIZE); for(auto& obj : obj_pool) diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc index 84dfcec253b..eaa72c42a73 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc @@ -126,7 +126,6 @@ void thread_hammer(wp_vector_t& weak_pool) void test01() { - bool test __attribute__((unused)) = true; sp_vector_t obj_pool(POOL_SIZE); for(auto& obj : obj_pool) diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/move_iterators/1.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/move_iterators/1.cc index efb311ddbec..610f1fa7850 100644 --- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/move_iterators/1.cc +++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/move_iterators/1.cc @@ -36,8 +36,6 @@ typedef test_container container_out; void test01() { - bool test __attribute__((unused)) = true; - int inarray[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; const int size = sizeof(inarray) / sizeof(int); diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy_n/move_iterators/1.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy_n/move_iterators/1.cc index 9420bdcaef8..7d7a343669c 100644 --- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy_n/move_iterators/1.cc +++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy_n/move_iterators/1.cc @@ -38,8 +38,6 @@ typedef test_container container_out; void test01() { - bool test __attribute__((unused)) = true; - int inarray[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; const int size = sizeof(inarray) / sizeof(int); diff --git a/libstdc++-v3/testsuite/20_util/temporary_buffer.cc b/libstdc++-v3/testsuite/20_util/temporary_buffer.cc index a7002c56321..a9e4a9d56d0 100644 --- a/libstdc++-v3/testsuite/20_util/temporary_buffer.cc +++ b/libstdc++-v3/testsuite/20_util/temporary_buffer.cc @@ -26,8 +26,6 @@ struct junk { char j[12]; }; int main(void) { - bool test __attribute__((unused)) = true; - typedef std::pair pair_type; pair_type results = std::get_temporary_buffer(5); diff --git a/libstdc++-v3/testsuite/20_util/time_point/1.cc b/libstdc++-v3/testsuite/20_util/time_point/1.cc index 59d0f7f9d93..b358818942c 100644 --- a/libstdc++-v3/testsuite/20_util/time_point/1.cc +++ b/libstdc++-v3/testsuite/20_util/time_point/1.cc @@ -27,7 +27,6 @@ void test01() { - bool test __attribute__((unused)) = true; using namespace std::chrono; time_point t1; diff --git a/libstdc++-v3/testsuite/20_util/time_point/2.cc b/libstdc++-v3/testsuite/20_util/time_point/2.cc index c0b6f1b8a1a..7704b9f71e7 100644 --- a/libstdc++-v3/testsuite/20_util/time_point/2.cc +++ b/libstdc++-v3/testsuite/20_util/time_point/2.cc @@ -27,7 +27,6 @@ void test01() { - bool test __attribute__((unused)) = true; using namespace std::chrono; time_point t1, t2; @@ -42,7 +41,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; using namespace std::chrono; time_point t1; diff --git a/libstdc++-v3/testsuite/20_util/time_point/3.cc b/libstdc++-v3/testsuite/20_util/time_point/3.cc index 3150fdf0989..87270167be8 100644 --- a/libstdc++-v3/testsuite/20_util/time_point/3.cc +++ b/libstdc++-v3/testsuite/20_util/time_point/3.cc @@ -27,7 +27,6 @@ void test01() { - bool test __attribute__((unused)) = true; using namespace std::chrono; time_point t1(seconds(1)); diff --git a/libstdc++-v3/testsuite/20_util/time_point/nonmember/constexpr.cc b/libstdc++-v3/testsuite/20_util/time_point/nonmember/constexpr.cc index ce8b3a435b5..f4803ca4d68 100644 --- a/libstdc++-v3/testsuite/20_util/time_point/nonmember/constexpr.cc +++ b/libstdc++-v3/testsuite/20_util/time_point/nonmember/constexpr.cc @@ -22,7 +22,6 @@ int main() { - bool test __attribute__((unused)) = true; using namespace std::chrono; typedef time_point time_type; diff --git a/libstdc++-v3/testsuite/20_util/tuple/48476.cc b/libstdc++-v3/testsuite/20_util/tuple/48476.cc index 3ea01f17c14..394e2166e71 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/48476.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/48476.cc @@ -29,8 +29,6 @@ template // libstdc++/48476 void test01() { - bool test __attribute__((unused)) = true; - std::shared_ptr p(new int()), q, r; std::tuple&, int> t0(p, 23), t1(q, 0); diff --git a/libstdc++-v3/testsuite/20_util/tuple/comparison_operators/comparisons.cc b/libstdc++-v3/testsuite/20_util/tuple/comparison_operators/comparisons.cc index 4c4f6f8e9b6..129e01a1f80 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/comparison_operators/comparisons.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/comparison_operators/comparisons.cc @@ -24,8 +24,6 @@ using namespace std; -bool test __attribute__((unused)) = true; - #define TEST1(x) VERIFY( x == x && !(x != x) && x <= x && !(x < x) ) int diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/allocators.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/allocators.cc index f1b033b8dc0..45e677261ab 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/cons/allocators.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/cons/allocators.cc @@ -102,7 +102,6 @@ struct UsesWithoutTag void test01() { - bool test __attribute__((unused)) = true; using std::allocator_arg; using std::tuple; using std::make_tuple; @@ -164,7 +163,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; using std::allocator_arg; using std::tuple; using std::make_tuple; diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/assignment.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/assignment.cc index 6612c7f5081..9a8eb61e25f 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/cons/assignment.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/cons/assignment.cc @@ -27,8 +27,6 @@ using namespace std; int main() { - bool test __attribute__((unused)) = true; - tuple<> ta; tuple<> tb; ta = tb; diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/big_tuples.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/big_tuples.cc index fbde7dff9f7..13833e74aa1 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/cons/big_tuples.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/cons/big_tuples.cc @@ -32,8 +32,6 @@ struct foo void test_constructors() { - bool test __attribute__((unused)) = true; - int x1=0,x2=0; const int &z1=x1; diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/constructor.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/constructor.cc index edfa706f83c..dd64ef5f44f 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/cons/constructor.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/cons/constructor.cc @@ -28,8 +28,6 @@ using namespace std; int main() { - bool test __attribute__((unused)) = true; - int x1=0,x2=0; const int &z1=x1; diff --git a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/23978.cc b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/23978.cc index 561aa8cbeba..98f2faebb4f 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/23978.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/23978.cc @@ -28,8 +28,6 @@ using namespace std; // libstdc++/23978 void test01() { - bool test __attribute__((unused)) = true; - pair p(1, 2); int x = 0; int y = 0; diff --git a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/48476.cc b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/48476.cc index 9ac0fda91cd..4238b4efef7 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/48476.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/48476.cc @@ -29,8 +29,6 @@ template void check_tuple_cat(std::tuple t1, std::tuple t2) { - bool test __attribute__((unused)) = true; - typedef std::tuple concatenated; auto cat1 = std::tuple_cat( t1, t2 ); diff --git a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/constexpr.cc b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/constexpr.cc index 58155433da1..86b5abb7e91 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/constexpr.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/constexpr.cc @@ -24,9 +24,6 @@ #include -bool test __attribute__((unused)) = true; - - // make_tuple void test_make_tuple() diff --git a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/forward_as_tuple.cc b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/forward_as_tuple.cc index 747b8d3651a..b106741efc0 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/forward_as_tuple.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/forward_as_tuple.cc @@ -28,8 +28,6 @@ void test01() { - bool test __attribute__((unused)) = true; - std::forward_as_tuple(); VERIFY( std::get<0>(std::forward_as_tuple(-1)) == -1 ); diff --git a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/make_tuple.cc b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/make_tuple.cc index ab855caca4c..ad7f6eff3ab 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/make_tuple.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/make_tuple.cc @@ -28,8 +28,6 @@ using namespace std; int main() { - bool test __attribute__((unused)) = true; - int i=0; make_tuple(1,2,4.0); make_tuple(ref(i)) = tuple(1); diff --git a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie.cc b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie.cc index d1cfc62232e..3a60f2cf829 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie.cc @@ -27,8 +27,6 @@ using namespace std; int main() { - bool test __attribute__((unused)) = true; - int x1 = 0; int x2 = 0; int y1 = 0; diff --git a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie2.cc b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie2.cc index 39cebfe6e0e..97c58108ec9 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie2.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/creation_functions/tie2.cc @@ -26,7 +26,6 @@ int main() { - bool test __attribute__((unused)) = true; using namespace std; int i; diff --git a/libstdc++-v3/testsuite/20_util/tuple/cv_tuple_size.cc b/libstdc++-v3/testsuite/20_util/tuple/cv_tuple_size.cc index ef45f0b2f4e..df5e0e993d3 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/cv_tuple_size.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/cv_tuple_size.cc @@ -25,7 +25,6 @@ void test01() { - bool test __attribute__((unused)) = true; using namespace std; VERIFY( tuple_size >::value == 0 ); diff --git a/libstdc++-v3/testsuite/20_util/tuple/element_access/get.cc b/libstdc++-v3/testsuite/20_util/tuple/element_access/get.cc index f0bcf22e9bf..0b2b3d6e22f 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/element_access/get.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/element_access/get.cc @@ -27,8 +27,6 @@ using namespace std; int main() { - bool test __attribute__((unused)) = true; - int j=1; const int k=2; tuple a(0,j,k); diff --git a/libstdc++-v3/testsuite/20_util/tuple/element_access/get_by_type.cc b/libstdc++-v3/testsuite/20_util/tuple/element_access/get_by_type.cc index b1f7a048b99..e02e9f56329 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/element_access/get_by_type.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/element_access/get_by_type.cc @@ -27,8 +27,6 @@ using namespace std; int main() { - bool test __attribute__((unused)) = true; - int j=1; const int k=2; tuple a(0,j,k); diff --git a/libstdc++-v3/testsuite/20_util/tuple/moveable.cc b/libstdc++-v3/testsuite/20_util/tuple/moveable.cc index d4b93c5439d..ed88361d6d0 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/moveable.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/moveable.cc @@ -28,8 +28,6 @@ int main() { - bool test __attribute__((unused)) = true; - std::tuple a(1, 2.0), b; b = std::move(a); VERIFY( std::get<0>(b) == 1 && std::get<1>(b) == 2.0 ); diff --git a/libstdc++-v3/testsuite/20_util/tuple/swap.cc b/libstdc++-v3/testsuite/20_util/tuple/swap.cc index a95eaf9babc..6e260c412ba 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/swap.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/swap.cc @@ -56,8 +56,6 @@ make_move_only (int i) void test01() { - bool test __attribute__((unused)) = true; - std::tuple<> t1, t2; std::swap(t1, t2); @@ -66,8 +64,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; - std::tuple t1(1), t2(2); std::swap(t1, t2); @@ -76,8 +72,6 @@ void test02() void test03() { - bool test __attribute__((unused)) = true; - std::tuple t1(1, 1.0f), t2(2, 2.0f); std::swap(t1, t2); @@ -87,8 +81,6 @@ void test03() void test04() { - bool test __attribute__((unused)) = true; - std::tuple t1(1, 1.0f, make_move_only(1)), t2(2, 2.0f, make_move_only(2)); diff --git a/libstdc++-v3/testsuite/20_util/tuple/tuple_size.cc b/libstdc++-v3/testsuite/20_util/tuple/tuple_size.cc index e1106ce8dc8..14b623d2be4 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/tuple_size.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/tuple_size.cc @@ -27,8 +27,6 @@ using namespace std; int main() { - bool test __attribute__((unused)) = true; - static_assert(tuple_size>::value == 0, ""); static_assert(tuple_size>::value == 1, ""); static_assert(tuple_size>::value == 1, ""); diff --git a/libstdc++-v3/testsuite/20_util/typeindex/comparison_operators.cc b/libstdc++-v3/testsuite/20_util/typeindex/comparison_operators.cc index 02aba25b946..bef65ff8e00 100644 --- a/libstdc++-v3/testsuite/20_util/typeindex/comparison_operators.cc +++ b/libstdc++-v3/testsuite/20_util/typeindex/comparison_operators.cc @@ -50,7 +50,6 @@ void test01() { - bool test __attribute__((unused)) = true; using namespace std; class Abraca { }; diff --git a/libstdc++-v3/testsuite/20_util/typeindex/hash.cc b/libstdc++-v3/testsuite/20_util/typeindex/hash.cc index f2440af0eb3..56a38a1da49 100644 --- a/libstdc++-v3/testsuite/20_util/typeindex/hash.cc +++ b/libstdc++-v3/testsuite/20_util/typeindex/hash.cc @@ -24,7 +24,6 @@ void test01() { - bool test __attribute__((unused)) = true; using namespace std; class Abraca { }; diff --git a/libstdc++-v3/testsuite/20_util/typeindex/hash_code.cc b/libstdc++-v3/testsuite/20_util/typeindex/hash_code.cc index 4bb96626e68..1f9f9e55937 100644 --- a/libstdc++-v3/testsuite/20_util/typeindex/hash_code.cc +++ b/libstdc++-v3/testsuite/20_util/typeindex/hash_code.cc @@ -24,7 +24,6 @@ void test01() { - bool test __attribute__((unused)) = true; using namespace std; class Abraca { }; diff --git a/libstdc++-v3/testsuite/20_util/typeindex/name.cc b/libstdc++-v3/testsuite/20_util/typeindex/name.cc index b43d71214d0..db80b3d7287 100644 --- a/libstdc++-v3/testsuite/20_util/typeindex/name.cc +++ b/libstdc++-v3/testsuite/20_util/typeindex/name.cc @@ -24,7 +24,6 @@ void test01() { - bool test __attribute__((unused)) = true; using namespace std; class Abraca { }; diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/48635.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/48635.cc index 9c1e535314b..935848ccbbf 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/48635.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/48635.cc @@ -29,7 +29,6 @@ struct Deleter Deleter& operator=(const Deleter&) { - bool test __attribute__((unused)) = true; VERIFY( true ); return *this; } @@ -37,7 +36,6 @@ struct Deleter Deleter& operator=(Deleter&&) { - bool test __attribute__((unused)) = true; VERIFY( false ); return *this; } diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/move.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/move.cc index d329fa9861d..0edd5f3286a 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/move.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/move.cc @@ -28,8 +28,6 @@ struct D : public B {}; void test01() { - bool test __attribute__((unused)) = true; - D *d = new D; std::unique_ptr p1(d); std::unique_ptr p2(new D); diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/move_array.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/move_array.cc index c11d75708dd..5c06bc08827 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/move_array.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/move_array.cc @@ -28,8 +28,6 @@ struct D : public B {}; void test01() { - bool test __attribute__((unused)) = true; - D *d = new D[3]; std::unique_ptr p1(d); std::unique_ptr p2; diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/nullptr.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/nullptr.cc index 35853dc5026..5825f96b444 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/nullptr.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/nullptr.cc @@ -27,8 +27,6 @@ struct A { }; void test01() { - bool test __attribute__((unused)) = true; - std::unique_ptr p(new A); p = nullptr; @@ -38,8 +36,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; - std::unique_ptr p(new A[2]); p = nullptr; diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/auto_ptr.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/auto_ptr.cc index 158893f090c..605f8ba28e1 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/auto_ptr.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/auto_ptr.cc @@ -31,8 +31,6 @@ struct A { }; void test01() { - bool test __attribute__((unused)) = true; - std::auto_ptr a(new A); std::unique_ptr a2(std::move(a)); VERIFY( a.get() == nullptr ); diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/nullptr.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/nullptr.cc index f46ac338706..4b80746d433 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/nullptr.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/nullptr.cc @@ -27,8 +27,6 @@ struct A { }; void test01() { - bool test __attribute__((unused)) = true; - std::unique_ptr p = nullptr; VERIFY( p.get() == nullptr ); @@ -37,8 +35,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; - std::unique_ptr p = nullptr; VERIFY( p.get() == nullptr ); diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/pointer.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/pointer.cc index 94859307500..91135ae5260 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/pointer.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/pointer.cc @@ -61,7 +61,6 @@ void test01() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::unique_ptr A_default; VERIFY( A_default.get() == 0 ); @@ -89,7 +88,6 @@ void test02() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; A * const A_default = 0; std::unique_ptr p1(A_default); diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/pointer_array.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/pointer_array.cc index 911ca54199c..5305e772357 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/pointer_array.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/pointer_array.cc @@ -60,7 +60,6 @@ void test01() { reset_count_struct __attribute__((unused)) reset; - bool test __attribute__((unused)) = true; std::unique_ptr A_default; VERIFY( A_default.get() == 0 ); diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/ptr_deleter.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/ptr_deleter.cc index 31a1d928bcb..2b3373edb08 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/ptr_deleter.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/ptr_deleter.cc @@ -30,7 +30,6 @@ void vdel(int* p) { ++count; delete[] p; } void test01() { - bool test __attribute__((unused)) = true; count = 0; { std::unique_ptr p(nullptr, del); @@ -45,7 +44,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; count = 0; { std::unique_ptr p(nullptr, vdel); diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/creation/array.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/creation/array.cc index cbfa2897621..b47261ede9e 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/creation/array.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/creation/array.cc @@ -32,8 +32,6 @@ struct A void test01() { - bool test __attribute__((unused)) = true; - std::unique_ptr a = std::make_unique(3); VERIFY( a != nullptr ); VERIFY( a[0].b && a[1].b && a[2].b ); diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/creation/single.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/creation/single.cc index 45c6ab2a6c9..dc7d6670711 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/creation/single.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/creation/single.cc @@ -32,8 +32,6 @@ struct A void test01() { - bool test __attribute__((unused)) = true; - int i = 0; double d = 0; char c = 0; diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/hash/1.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/hash/1.cc index dd5570ec6c0..6fc4fdc809d 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/hash/1.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/hash/1.cc @@ -24,8 +24,6 @@ void test01() { - bool test __attribute__((unused)) = true; - struct T { }; std::unique_ptr u0(new T); diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/43183.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/43183.cc index 9747a10a8a3..1461efab523 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/43183.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/43183.cc @@ -36,8 +36,6 @@ int D::count = 0; void test01() { - bool test __attribute__((unused)) = true; - std::unique_ptr up; up.reset(); VERIFY( D::count == 0 ); diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/comparisons.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/comparisons.cc index b3a580593e3..74cbc8735b7 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/comparisons.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/comparisons.cc @@ -36,8 +36,6 @@ struct B : A void test01() { - bool test __attribute__((unused)) = true; - std::unique_ptr p1; std::unique_ptr p2; @@ -49,8 +47,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; - std::unique_ptr p1; std::unique_ptr p2(new A); diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/comparisons_array.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/comparisons_array.cc index f434b1f7b7b..c5c4400c9df 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/comparisons_array.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/comparisons_array.cc @@ -36,8 +36,6 @@ struct B : A void test01() { - bool test __attribute__((unused)) = true; - std::unique_ptr p1; std::unique_ptr p2; @@ -49,8 +47,6 @@ test01() void test02() { - bool test __attribute__((unused)) = true; - std::unique_ptr p1; std::unique_ptr p2(new A[3]); diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/swap.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/swap.cc index 67040d472ec..521b34c5922 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/swap.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/specialized_algorithms/swap.cc @@ -27,8 +27,6 @@ struct A {}; void test01() { - bool test __attribute__((unused)) = true; - std::unique_ptr p1; std::unique_ptr p2(new A); std::unique_ptr p3; diff --git a/libstdc++-v3/testsuite/20_util/uses_allocator/construction.cc b/libstdc++-v3/testsuite/20_util/uses_allocator/construction.cc index d5b54741b53..9ac4589765e 100644 --- a/libstdc++-v3/testsuite/20_util/uses_allocator/construction.cc +++ b/libstdc++-v3/testsuite/20_util/uses_allocator/construction.cc @@ -91,8 +91,6 @@ template template void test(T... args) { - bool test __attribute__((unused)) = true; - VERIFY( test2(args...) ); VERIFY( test2(args...) ); VERIFY( test2(args...) ); diff --git a/libstdc++-v3/testsuite/20_util/uses_allocator/value.cc b/libstdc++-v3/testsuite/20_util/uses_allocator/value.cc index 8202b51bc8b..46fc72f904c 100644 --- a/libstdc++-v3/testsuite/20_util/uses_allocator/value.cc +++ b/libstdc++-v3/testsuite/20_util/uses_allocator/value.cc @@ -38,7 +38,6 @@ struct UD { typedef MyDerivedAlloc allocator_type; }; void test01() { - bool test __attribute__((unused)) = true; using std::uses_allocator; using namespace __gnu_test; diff --git a/libstdc++-v3/testsuite/20_util/variant/run.cc b/libstdc++-v3/testsuite/20_util/variant/run.cc index cbe3b17fd7a..3a952221d4e 100644 --- a/libstdc++-v3/testsuite/20_util/variant/run.cc +++ b/libstdc++-v3/testsuite/20_util/variant/run.cc @@ -51,16 +51,12 @@ struct AlwaysThrow void default_ctor() { - bool test [[gnu::unused]] = true; - variant v; VERIFY(holds_alternative(v)); } void copy_ctor() { - bool test [[gnu::unused]] = true; - variant v("a"); VERIFY(holds_alternative(v)); variant u(v); @@ -70,8 +66,6 @@ void copy_ctor() void move_ctor() { - bool test [[gnu::unused]] = true; - variant v("a"); VERIFY(holds_alternative(v)); variant u(std::move(v)); @@ -82,8 +76,6 @@ void move_ctor() void arbitrary_ctor() { - bool test [[gnu::unused]] = true; - variant v("a"); VERIFY(holds_alternative(v)); VERIFY(get<1>(v) == "a"); @@ -91,8 +83,6 @@ void arbitrary_ctor() void copy_assign() { - bool test [[gnu::unused]] = true; - variant v("a"); VERIFY(holds_alternative(v)); variant u; @@ -103,8 +93,6 @@ void copy_assign() void move_assign() { - bool test [[gnu::unused]] = true; - variant v("a"); VERIFY(holds_alternative(v)); variant u; @@ -116,8 +104,6 @@ void move_assign() void arbitrary_assign() { - bool test [[gnu::unused]] = true; - variant v; v = "a"; @@ -127,8 +113,6 @@ void arbitrary_assign() void dtor() { - bool test [[gnu::unused]] = true; - struct A { A(int& called) : called(called) {} ~A() { @@ -150,8 +134,6 @@ void dtor() void in_place_index_ctor() { - bool test [[gnu::unused]] = true; - { variant v(in_place<1>, "a"); VERIFY(holds_alternative(v)); @@ -166,8 +148,6 @@ void in_place_index_ctor() void in_place_type_ctor() { - bool test [[gnu::unused]] = true; - { variant v(in_place, "a"); VERIFY(holds_alternative(v)); @@ -206,8 +186,6 @@ namespace std void uses_allocator_ctor() { - bool test [[gnu::unused]] = true; - std::allocator a; variant v(std::allocator_arg, a); VERIFY(get<0>(v).d == 0); @@ -226,8 +204,6 @@ void uses_allocator_ctor() void emplace() { - bool test [[gnu::unused]] = true; - variant v; v.emplace<0>(1); VERIFY(get<0>(v) == 1); @@ -252,8 +228,6 @@ void emplace() void test_get() { - bool test [[gnu::unused]] = true; - VERIFY(get<1>(variant("a")) == "a"); VERIFY(get(variant("a")) == "a"); { @@ -286,8 +260,6 @@ void test_get() void test_relational() { - bool test [[gnu::unused]] = true; - VERIFY((variant(2) < variant(3))); VERIFY((variant(3) == variant(3))); VERIFY((variant(3) > variant(2))); @@ -303,8 +275,6 @@ void test_relational() void test_swap() { - bool test [[gnu::unused]] = true; - variant a("a"), b("b"); a.swap(b); VERIFY(get<1>(a) == "b"); @@ -316,8 +286,6 @@ void test_swap() void test_visit() { - bool test [[gnu::unused]] = true; - { struct Visitor { @@ -383,8 +351,6 @@ void test_visit() void test_hash() { - bool test [[gnu::unused]] = true; - unordered_set> s; VERIFY(s.emplace(3).second); VERIFY(s.emplace("asdf").second); @@ -419,8 +385,6 @@ void test_hash() void test_valueless_by_exception() { - bool test [[gnu::unused]] = true; - { AlwaysThrow a; bool caught = false; diff --git a/libstdc++-v3/testsuite/20_util/weak_ptr/observers/owner_before.cc b/libstdc++-v3/testsuite/20_util/weak_ptr/observers/owner_before.cc index 3974ba8967a..fd1f1625357 100644 --- a/libstdc++-v3/testsuite/20_util/weak_ptr/observers/owner_before.cc +++ b/libstdc++-v3/testsuite/20_util/weak_ptr/observers/owner_before.cc @@ -30,8 +30,6 @@ struct B { }; int test01() { - bool test __attribute__((unused)) = true; - // test empty weak_ptrs compare equivalent std::weak_ptr p1; std::weak_ptr p2; @@ -47,8 +45,6 @@ test01() int test02() { - bool test __attribute__((unused)) = true; - std::shared_ptr a0; std::weak_ptr w0(a0); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy.cc index 67a1727bb58..6871acdda9d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy.cc @@ -30,7 +30,6 @@ using __gnu_test::propagating_allocator; void test01() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); @@ -48,7 +47,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); @@ -66,7 +64,6 @@ void test02() void test03() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy_assign.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy_assign.cc index c70cee30dae..5ab737aa90f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy_assign.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy_assign.cc @@ -30,7 +30,6 @@ using __gnu_test::propagating_allocator; void test01() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); @@ -66,7 +65,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move.cc index 7028678fe14..a4291f9dbb9 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move.cc @@ -30,7 +30,6 @@ using __gnu_test::uneq_allocator; void test01() { - bool test __attribute__((unused)) = true; typedef uneq_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); @@ -42,7 +41,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; typedef uneq_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move_assign.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move_assign.cc index ff4b1474d8d..9d08f9d90fa 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move_assign.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move_assign.cc @@ -30,7 +30,6 @@ using __gnu_test::propagating_allocator; void test01() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; @@ -69,7 +68,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; @@ -108,7 +106,6 @@ void test02() void test03() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/swap.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/swap.cc index 7d5d8b9f0e5..fcee8ec6050 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/swap.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/swap.cc @@ -47,7 +47,6 @@ operator!=(const propagating_allocator&, void test01() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); @@ -63,7 +62,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc index 57baf3b539b..6bb3086bb7a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc @@ -30,7 +30,6 @@ using __gnu_test::propagating_allocator; void test01() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); @@ -48,7 +47,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); @@ -66,7 +64,6 @@ void test02() void test03() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc index 4cfb543b566..7b7372a25ee 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc @@ -30,7 +30,6 @@ using __gnu_test::propagating_allocator; void test01() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); @@ -66,7 +65,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move.cc index 4124f44d7fb..376a64abd6d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move.cc @@ -30,7 +30,6 @@ using __gnu_test::uneq_allocator; void test01() { - bool test __attribute__((unused)) = true; typedef uneq_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); @@ -42,7 +41,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; typedef uneq_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc index bb93b155cfc..a8be7777a87 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc @@ -30,7 +30,6 @@ using __gnu_test::propagating_allocator; void test01() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; @@ -69,7 +68,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; @@ -108,7 +106,6 @@ void test02() void test03() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc index d56517e7ff7..24c1669b528 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc @@ -47,7 +47,6 @@ operator!=(const propagating_allocator&, void test01() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); @@ -63,7 +62,6 @@ void test01() void test02() { - bool test __attribute__((unused)) = true; typedef propagating_allocator alloc_type; typedef std::basic_string test_type; test_type v1(alloc_type(1)); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc index d7e5eaec69c..2aad99caf4c 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc @@ -125,8 +125,6 @@ namespace std void test01() { - bool test __attribute__((unused)) = true; - // non POD types : resize, capacity, reserve std::basic_string< A > str02; typedef std::basic_string< A >::size_type size_type_o; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/1.cc index 111585faf99..a22d4a3427f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/1.cc @@ -25,7 +25,6 @@ void test01() { // POD types : resize, capacity, reserve - bool test __attribute__((unused)) = true; std::string str01; typedef std::string::size_type size_type_s; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/18654.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/18654.cc index 78ae9e8b1a8..75585340768 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/18654.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/18654.cc @@ -32,7 +32,6 @@ void test01() { using namespace std; - bool test __attribute__((unused)) = true; typedef string::size_type size_type; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/2.cc index bc5b96cfaa3..95d9a674446 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/2.cc @@ -26,8 +26,6 @@ // http://gcc.gnu.org/ml/libstdc++/2001-11/msg00150.html void test02() { - bool test __attribute__((unused)) = true; - std::string str01 = "twelve chars"; // str01 becomes shared std::string str02 = str01; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/shrink_to_fit.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/shrink_to_fit.cc index d648d9db5df..609ea4c2ec5 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/shrink_to_fit.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/shrink_to_fit.cc @@ -25,8 +25,6 @@ // libstdc++/42573 void test01() { - bool test __attribute__((unused)) = true; - std::string s(100, 'a'); s.push_back('b'); s.push_back('b'); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/1.cc index e41d998c8b7..7542855f5f8 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/1.cc @@ -25,7 +25,6 @@ void test01() { // POD types : resize, capacity, reserve - bool test __attribute__((unused)) = true; std::wstring str01; typedef std::wstring::size_type size_type_s; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc index c6651534ec3..d249f22b754 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc @@ -32,7 +32,6 @@ void test01() { using namespace std; - bool test __attribute__((unused)) = true; typedef wstring::size_type size_type; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/2.cc index 7dac3d5dea5..9207e5b17a6 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/2.cc @@ -26,8 +26,6 @@ // http://gcc.gnu.org/ml/libstdc++/2001-11/msg00150.html void test02() { - bool test __attribute__((unused)) = true; - std::wstring str01 = L"twelve chars"; // str01 becomes shared std::wstring str02 = str01; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/shrink_to_fit.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/shrink_to_fit.cc index 1c6a880b573..fa284001051 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/shrink_to_fit.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/shrink_to_fit.cc @@ -25,8 +25,6 @@ // libstdc++/42573 void test01() { - bool test __attribute__((unused)) = true; - std::wstring s(100, L'a'); s.push_back(L'b'); s.push_back(L'b'); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc index 48d74b6e1e6..9d04df61c49 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc @@ -26,7 +26,6 @@ void test01(void) { - bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::iterator citerator; csize_type npos = std::string::npos; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/2.cc index c836c3354b2..b2ae7a071a8 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/2.cc @@ -24,8 +24,6 @@ void test02() { - bool test __attribute__((unused)) = true; - // template // basic_string(_InputIter begin, _InputIter end, const allocator& a) // where _InputIter is integral [21.3.1 para 15] diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/3.cc index 8bd7f602bfb..dfb9f21ab49 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/3.cc @@ -26,7 +26,6 @@ void test03() { - bool test __attribute__((unused)) = true; const char* with_nulls = "This contains \0 a zero byte."; // These are tests to see how basic_string handles data with NUL diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/4.cc index 18930d96474..b25ebeab381 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/4.cc @@ -25,8 +25,6 @@ // http://gcc.gnu.org/ml/libstdc++/2002-06/msg00025.html void test04() { - bool test __attribute__((unused)) = true; - std::string str01("portofino"); std::string::reverse_iterator i1 = str01.rbegin(); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/42261.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/42261.cc index 35482144119..6edcd8a7deb 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/42261.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/42261.cc @@ -21,7 +21,6 @@ // libstdc++/42261 void test01() { - bool test __attribute__((unused)) = true; using namespace std; const string s(string::size_type(6), string::size_type('f')); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/5.cc index 8f3992c4376..2262d219333 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/5.cc @@ -26,8 +26,6 @@ // libstdc++/8347 void test05() { - bool test __attribute__((unused)) = true; - std::vector empty; std::string empty2(empty.begin(), empty.end()); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/6.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/6.cc index 88e94b5f014..9c0932c317e 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/6.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/6.cc @@ -36,8 +36,6 @@ string data(long len) void test01(int iter) { - bool test __attribute__((unused)) = true; - for (long i = 0, j = 1; i < iter; ++i, j *= 3) { istringstream isstr(data(j)); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/7.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/7.cc index 181ef7e2446..a7f575f217e 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/7.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/7.cc @@ -24,8 +24,6 @@ void test02() { - bool test __attribute__((unused)) = true; - std::string_view s("foo"); std::string s2(s); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/8.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/8.cc index 6534f762a00..64475d08779 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/8.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/8.cc @@ -30,8 +30,6 @@ construct(Args&&... args) void test01() { - bool test __attribute__((unused)) = true; - using string = std::string; using list = std::initializer_list; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/moveable.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/moveable.cc index 86f8f25ac3a..e3ed5e840e8 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/moveable.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/moveable.cc @@ -28,8 +28,6 @@ void test01() { - bool test __attribute__((unused)) = true; - std::string a, b; a.push_back('1'); b = std::move(a); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/moveable2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/moveable2.cc index 98d56b071c4..84442ebe7a4 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/moveable2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/moveable2.cc @@ -37,8 +37,6 @@ public: void test01() { - bool test __attribute__((unused)) = true; - tstring a, b; a.push_back('1'); b = std::move(a); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/1.cc index 1deeb8cd2c5..8b10a0ebae2 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/1.cc @@ -26,7 +26,6 @@ void test01(void) { - bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::iterator citerator; csize_type npos = std::wstring::npos; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/2.cc index 89808633c3d..1772022b22c 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/2.cc @@ -24,8 +24,6 @@ void test02() { - bool test __attribute__((unused)) = true; - // template // basic_string(_InputIter begin, _InputIter end, const allocator& a) // where _InputIter is integral [21.3.1 para 15] diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/3.cc index b83896842b2..6d2c2edfb5b 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/3.cc @@ -26,7 +26,6 @@ void test03() { - bool test __attribute__((unused)) = true; const wchar_t* with_nulls = L"This contains \0 a zero byte."; // These are tests to see how basic_string handles data with NUL diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/4.cc index 9bad10d8ff6..40a481d9374 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/4.cc @@ -25,8 +25,6 @@ // http://gcc.gnu.org/ml/libstdc++/2002-06/msg00025.html void test04() { - bool test __attribute__((unused)) = true; - std::wstring str01(L"portofino"); std::wstring::reverse_iterator i1 = str01.rbegin(); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/42261.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/42261.cc index 6d5764774ac..ca214739b6f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/42261.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/42261.cc @@ -21,7 +21,6 @@ // libstdc++/42261 void test01() { - bool test __attribute__((unused)) = true; using namespace std; const wstring s(wstring::size_type(6), wstring::size_type(L'f')); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/5.cc index 5c4e5b452d7..7dfd76e8057 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/5.cc @@ -26,8 +26,6 @@ // libstdc++/8347 void test05() { - bool test __attribute__((unused)) = true; - std::vector empty; std::wstring empty2(empty.begin(), empty.end()); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/6.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/6.cc index 3f677a0c1ef..4c37360d299 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/6.cc @@ -42,8 +42,6 @@ wstring data(long len) void test01(int iter) { - bool test __attribute__((unused)) = true; - for (long i = 0, j = 1; i < iter; ++i, j *= 3) { wistringstream isstr(data(j)); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/7.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/7.cc index f037e538221..33ce39ecaa4 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/7.cc @@ -24,8 +24,6 @@ void test02() { - bool test __attribute__((unused)) = true; - std::wstring_view s(L"foo"); std::wstring s2(s); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/8.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/8.cc index 9152ad9a8d4..146ba2d31b0 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/8.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/8.cc @@ -30,8 +30,6 @@ construct(Args&&... args) void test01() { - bool test __attribute__((unused)) = true; - using string = std::wstring; using list = std::initializer_list; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/moveable.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/moveable.cc index 38e93f52099..2f2ca4c8f87 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/moveable.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/moveable.cc @@ -28,8 +28,6 @@ void test01() { - bool test __attribute__((unused)) = true; - std::wstring a, b; a.push_back(L'1'); b = std::move(a); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/moveable2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/moveable2.cc index 3bfed12c686..cfd39305621 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/moveable2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/moveable2.cc @@ -37,8 +37,6 @@ public: void test01() { - bool test __attribute__((unused)) = true; - twstring a, b; a.push_back(L'1'); b = std::move(a); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/1.cc index 515e1129bd1..0d4149487d4 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/1.cc @@ -23,9 +23,8 @@ #include #include -bool test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::const_reference cref; typedef std::string::reference ref; @@ -78,7 +77,6 @@ bool test01(void) catch(...) { VERIFY( false ); } - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/2.cc index 9222c256683..c6436161397 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/2.cc @@ -26,9 +26,8 @@ // Do a quick sanity check on known problems with element access and // ref-counted strings. These should all pass, regardless of the // underlying string implementation, of course. -bool test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::iterator siterator; typedef std::string::reverse_iterator sriterator; @@ -100,7 +99,6 @@ bool test01(void) VERIFY( str03[0] == 'x' ); // need to also test for const begin/const end - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/3.cc index dbdd6da1319..1347607a5dc 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/3.cc @@ -25,9 +25,8 @@ // Do another sanity check, this time for member functions that return // iterators, namely insert and erase. -bool test02(void) +void test02(void) { - bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::iterator siterator; typedef std::string::reverse_iterator sriterator; @@ -73,7 +72,6 @@ bool test02(void) std::string str13 = str12; *p2 = 'e'; VERIFY( str12 != str13 ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/4.cc index 8c830123296..dc8f50fe520 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/4.cc @@ -25,7 +25,6 @@ // http://gcc.gnu.org/ml/libstdc++/2004-01/msg00184.html void test01() { - bool test __attribute__((unused)) = true; using namespace std; for (int i = 0; i < 2000; ++i) diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/58163.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/58163.cc index d5a4c010dfb..c2ea0fa7744 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/58163.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/58163.cc @@ -24,8 +24,6 @@ // PR c++/58163 void test01() { - bool test __attribute__((unused)) = true; - const std::string cs; std::string s; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/empty.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/empty.cc index dfe7ce07299..bedc4d366b8 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/empty.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/empty.cc @@ -22,8 +22,6 @@ // as per 21.3.4 int main() { - bool test __attribute__((unused)) = true; - { std::string empty; char c = empty[0]; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/front_back.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/front_back.cc index 1ecd3e95917..8761cb22b66 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/front_back.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/front_back.cc @@ -25,8 +25,6 @@ void test01() { - bool test __attribute__((unused)) = true; - std::string str("ramifications"); const std::string cstr("melodien"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/1.cc index a243cf803bb..bdaef8547e0 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/1.cc @@ -23,9 +23,8 @@ #include #include -bool test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::const_reference cref; typedef std::wstring::reference ref; @@ -78,7 +77,6 @@ bool test01(void) catch(...) { VERIFY( false ); } - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/2.cc index 8f843de45de..2f93dbf6419 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/2.cc @@ -26,9 +26,8 @@ // Do a quick sanity check on known problems with element access and // ref-counted strings. These should all pass, regardless of the // underlying string implementation, of course. -bool test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::iterator siterator; typedef std::wstring::reverse_iterator sriterator; @@ -100,8 +99,6 @@ bool test01(void) VERIFY( str03[0] == L'x' ); // need to also test for const begin/const end - VERIFY(test); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/3.cc index c78eed54acc..5a1e4fdffa1 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/3.cc @@ -25,9 +25,8 @@ // Do another sanity check, this time for member functions that return // iterators, namely insert and erase. -bool test02(void) +void test02(void) { - bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::iterator siterator; typedef std::wstring::reverse_iterator sriterator; @@ -73,7 +72,6 @@ bool test02(void) std::wstring str13 = str12; *p2 = L'e'; VERIFY( str12 != str13 ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/4.cc index 28b115985fc..f4a9b92eb1f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/4.cc @@ -25,7 +25,6 @@ // http://gcc.gnu.org/ml/libstdc++/2004-01/msg00184.html void test01() { - bool test __attribute__((unused)) = true; using namespace std; for (int i = 0; i < 2000; ++i) diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/58163.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/58163.cc index cbf588a1594..749fd49771d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/58163.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/58163.cc @@ -24,8 +24,6 @@ // PR c++/58163 void test01() { - bool test __attribute__((unused)) = true; - const std::wstring cs; std::wstring s; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/empty.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/empty.cc index cf3d9c3326d..11b8d32c519 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/empty.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/empty.cc @@ -22,8 +22,6 @@ // as per 21.3.4 int main() { - bool test __attribute__((unused)) = true; - { std::wstring empty; wchar_t c = empty[0]; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/front_back.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/front_back.cc index ba4aa09ec5d..d73dc952a09 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/front_back.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/front_back.cc @@ -25,8 +25,6 @@ void test01() { - bool test __attribute__((unused)) = true; - std::wstring str(L"ramifications"); const std::wstring cstr(L"melodien"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/init-list.cc b/libstdc++-v3/testsuite/21_strings/basic_string/init-list.cc index a36ccf41052..1295d3cf37f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/init-list.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/init-list.cc @@ -23,10 +23,8 @@ using namespace std; -int test01(void) +void test01(void) { - bool test = true; - string s1 = { 'a', 'b', 'c' }; VERIFY(s1 == "abc"); @@ -60,8 +58,6 @@ int test01(void) i2 = i1+6; s1.replace(i1, i2, { 'y', 'z' }); VERIFY(s1 == "mnyzo"); - - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/1.cc index 21a67facf0a..9d49db9c507 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/1.cc @@ -30,9 +30,8 @@ #include #include -bool test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::const_reference cref; typedef std::string::reference ref; @@ -154,7 +153,6 @@ bool test01(void) std::string hello_world; std::cout << hello_world; - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/10.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/10.cc index 1f11433e0fc..ed2a34ea428 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/10.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/10.cc @@ -42,8 +42,6 @@ string prepare(string::size_type len, unsigned nchunks, char delim) void check(istream& stream, const string& str, unsigned nchunks, char delim) { - bool test __attribute__((unused)) = true; - string chunk; string::size_type index = 0, index_new = 0; unsigned n = 0; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/11.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/11.cc index 3e2ac0a85c2..484194c2997 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/11.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/11.cc @@ -42,8 +42,6 @@ string prepare(string::size_type len, unsigned nchunks) void check(istream& stream, const string& str, unsigned nchunks) { - bool test __attribute__((unused)) = true; - string chunk; string::size_type index = 0, index_new = 0; unsigned n = 0; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc index e5f8794ac7f..33cb0bffd5a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc @@ -33,7 +33,6 @@ void test01() { using namespace std; - bool test __attribute__((unused)) = true; ostringstream oss_01; const string str_01(50, 'a'); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/4.cc index 0a7808a5aff..394d0e1a4fd 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/4.cc @@ -31,7 +31,6 @@ // based on a bug report libstdc++ 9 void test04(std::size_t size) { - bool test __attribute__((unused)) = true; std::string str(size, 's'); std::size_t expected_size = 2 * (size + 1); std::ostringstream oss(str); @@ -43,11 +42,11 @@ void test04(std::size_t size) // stress test oss << str << std::endl; if (!oss.good()) - test = false; + VERIFY( false ); oss << str << std::endl; if (!oss.good()) - test = false; + VERIFY( false ); VERIFY( str.size() == size ); VERIFY( oss.good() ); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/5.cc index fad1c57f3e3..3ddae09123f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/5.cc @@ -35,7 +35,7 @@ // mode == out void test05(std::size_t size) { - bool test __attribute__((unused)) = true; + bool test = true; const char filename[] = "inserters_extractors-1.txt"; const char fillc = 'f'; std::ofstream ofs(filename); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/6.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/6.cc index 879f333402b..5121bb58164 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/6.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/6.cc @@ -32,8 +32,6 @@ // http://gcc.gnu.org/ml/libstdc++/1999-q4/msg00049.html void test06(void) { - bool test __attribute__((unused)) = true; - typedef std::string::size_type size_type; std::string str01("@silent"); size_type i01 = str01.size(); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/7.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/7.cc index b5eb8ea47e7..6d49976dc08 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/7.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/7.cc @@ -33,7 +33,6 @@ // NB: this is a defect in the standard. void test07(void) { - bool test __attribute__((unused)) = true; const std::string name("z6.cc"); std::istringstream iss (name); int i = 0; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/8.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/8.cc index 8810dbbed06..eed028406cf 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/8.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/8.cc @@ -33,7 +33,6 @@ void test08() { using namespace std; - bool test __attribute__((unused)) = true; istringstream istrm("enero:2001"); int year; char sep; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/9.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/9.cc index 88ba5d4b00e..31965716ddc 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/9.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/9.cc @@ -31,7 +31,6 @@ // libstdc++/2830 void test09() { - bool test __attribute__((unused)) = true; std::string blanks( 3, '\0'); std::string foo = "peace"; foo += blanks; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/pod/10081-in.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/pod/10081-in.cc index ea885451e0c..e7e2165a1bd 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/pod/10081-in.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/pod/10081-in.cc @@ -34,8 +34,6 @@ void test01() typedef basic_stringbuf stringbuf_type; typedef basic_istream istream_type; - bool test __attribute__((unused)) = true; - string_type str; stringbuf_type strbuf01; istream_type stream(&strbuf01); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/pod/10081-out.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/pod/10081-out.cc index eff9a29bd44..cffd3976ed0 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/pod/10081-out.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/pod/10081-out.cc @@ -34,8 +34,6 @@ void test01() typedef basic_stringbuf stringbuf_type; typedef basic_ostream ostream_type; - bool test __attribute__((unused)) = true; - string_type str; stringbuf_type strbuf01; ostream_type stream(&strbuf01); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc index 7100818f45a..3529f190a5d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc @@ -30,9 +30,8 @@ #include #include -bool test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::const_reference cref; typedef std::wstring::reference ref; @@ -154,7 +153,6 @@ bool test01(void) std::wstring hello_world; std::wcout << hello_world; - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc index 17525d30c1f..6a433141ef9 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc @@ -46,8 +46,6 @@ wstring prepare(wstring::size_type len, unsigned nchunks, wchar_t delim) void check(wistream& stream, const wstring& str, unsigned nchunks, wchar_t delim) { - bool test __attribute__((unused)) = true; - wstring chunk; wstring::size_type index = 0, index_new = 0; unsigned n = 0; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc index e0bcd8abb98..ae1c11c27c9 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc @@ -46,8 +46,6 @@ wstring prepare(wstring::size_type len, unsigned nchunks) void check(wistream& stream, const wstring& str, unsigned nchunks) { - bool test __attribute__((unused)) = true; - wstring chunk; wstring::size_type index = 0, index_new = 0; unsigned n = 0; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc index 60db7ad3500..a6e43517acc 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc @@ -33,7 +33,6 @@ void test01() { using namespace std; - bool test __attribute__((unused)) = true; wostringstream oss_01; const wstring str_01(50, L'a'); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc index 51486b0caf0..cbe3debdec9 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc @@ -31,7 +31,6 @@ // based on a bug report libstdc++ 9 void test04(std::size_t size) { - bool test __attribute__((unused)) = true; std::wstring str(size, L's'); std::size_t expected_size = 2 * (size + 1); std::wostringstream oss(str); @@ -43,11 +42,11 @@ void test04(std::size_t size) // stress test oss << str << std::endl; if (!oss.good()) - test = false; + VERIFY( false ); oss << str << std::endl; if (!oss.good()) - test = false; + VERIFY( false ); VERIFY( str.size() == size ); VERIFY( oss.good() ); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc index ea0a84aeea2..a812bb7e439 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc @@ -33,7 +33,7 @@ // mode == out void test05(std::size_t size) { - bool test __attribute__((unused)) = true; + bool test = true; const char filename[] = "inserters_extractors-1.txt"; const wchar_t fillc = L'f'; std::wofstream ofs(filename); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc index 9e184f07332..1f6dfae0b9a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc @@ -32,8 +32,6 @@ // http://gcc.gnu.org/ml/libstdc++/1999-q4/msg00049.html void test06(void) { - bool test __attribute__((unused)) = true; - typedef std::wstring::size_type size_type; std::wstring str01(L"@silent"); size_type i01 = str01.size(); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc index 52087b24419..12f443f72ef 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc @@ -33,7 +33,6 @@ // NB: this is a defect in the standard. void test07(void) { - bool test __attribute__((unused)) = true; const std::wstring name(L"z6.cc"); std::wistringstream iss(name); int i = 0; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/8.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/8.cc index f853b2fbdfd..c205c508291 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/8.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/8.cc @@ -33,7 +33,6 @@ void test08() { using namespace std; - bool test __attribute__((unused)) = true; wistringstream istrm(L"enero:2001"); int year; wchar_t sep; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/9.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/9.cc index d08795844d2..51e9efd2633 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/9.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/9.cc @@ -31,7 +31,6 @@ // libstdc++/2830 void test09() { - bool test __attribute__((unused)) = true; std::wstring blanks(3, L'\0'); std::wstring foo = L"peace"; foo += blanks; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/1.cc index 1ccb9da5fd6..1647dfc2ec6 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/1.cc @@ -23,9 +23,8 @@ #include #include -bool test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::const_reference cref; typedef std::string::reference ref; @@ -148,7 +147,6 @@ bool test01(void) str05.append(str05.begin(), str05.begin() + str05.find('r')); VERIFY( str05 == "point bolivar, texaspoint boliva" ); VERIFY( str05 != str01 ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/2.cc index b393f1e11ad..a893c9300ea 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/2.cc @@ -27,8 +27,6 @@ void test02() { - bool test __attribute__((unused)) = true; - using namespace std; string one; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/3.cc index 178670d3bca..096f3fc85eb 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/3.cc @@ -27,8 +27,6 @@ void test03() { - bool test __attribute__((unused)) = true; - using namespace std; const char * source = "Kesto"; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/4.cc index 0df4a6d0fd5..f768fde778f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/char/4.cc @@ -25,7 +25,6 @@ void test03() { - bool test __attribute__((unused)) = true; std::string_view str1("foo"); std::string str2; str2 += str1; @@ -42,8 +41,6 @@ test03() void test04() { - bool test __attribute__((unused)) = true; - std::string str("a"); char c = 'b'; str.append(&c, 1); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/1.cc index 0700d70f60a..e0d4c653213 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/1.cc @@ -23,9 +23,8 @@ #include #include -bool test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::const_reference cref; typedef std::wstring::reference ref; @@ -148,7 +147,6 @@ bool test01(void) str05.append(str05.begin(), str05.begin() + str05.find(L'r')); VERIFY( str05 == L"point bolivar, texaspoint boliva" ); VERIFY( str05 != str01 ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/2.cc index 084d1fd694f..c2984965e04 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/2.cc @@ -27,8 +27,6 @@ void test02() { - bool test __attribute__((unused)) = true; - using namespace std; wstring one; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/3.cc index 4ecea7635a5..91d2de2d857 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/3.cc @@ -33,8 +33,6 @@ void test03() { - bool test __attribute__((unused)) = true; - using namespace std; const wchar_t * source = L"Kesto"; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc index dc1bd648d34..69f7556c7d0 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc @@ -25,7 +25,6 @@ void test03() { - bool test __attribute__((unused)) = true; std::wstring_view str1(L"foo"); std::wstring str2; str2 += str1; @@ -42,8 +41,6 @@ test03() void test04() { - bool test __attribute__((unused)) = true; - std::wstring str(L"a"); wchar_t c = L'b'; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/1.cc index c2dd067ac62..4250e59a16a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/1.cc @@ -26,8 +26,6 @@ void test01() { - bool test __attribute__((unused)) = true; - using namespace std; const char* strlit = "../the long pier/Hanalei Bay/Kauai/Hawaii"; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/2.cc index ff85419523a..9cbcd132624 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/2.cc @@ -27,8 +27,6 @@ void test02() { - bool test __attribute__((unused)) = true; - using namespace std; string one = "Selling England by the pound"; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/3.cc index 33644d0dbff..90ba1a45df3 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/3.cc @@ -27,8 +27,6 @@ void test03() { - bool test __attribute__((unused)) = true; - using namespace std; string one; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/4.cc index 201dee04eb6..cfa87b2834f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/4.cc @@ -25,7 +25,6 @@ void test03() { - bool test __attribute__((unused)) = true; std::string_view str1("foo"); std::string str2; str2.assign(str1); @@ -39,8 +38,6 @@ test03() void test04() { - bool test __attribute__((unused)) = true; - std::string str("a"); char c = 'b'; str.assign(&c, 1); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/move_assign.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/move_assign.cc index 3f942bd2544..b8ebfecdcd9 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/move_assign.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/char/move_assign.cc @@ -28,8 +28,6 @@ void test01() { - bool test __attribute__((unused)) = true; - std::string a, b; a.push_back('1'); b.assign(std::move(a)); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/1.cc index f5a16b492ff..0fd8c070f00 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/1.cc @@ -26,8 +26,6 @@ void test01() { - bool test __attribute__((unused)) = true; - using namespace std; const wchar_t* strlit = L"../the long pier/Hanalei Bay/Kauai/Hawaii"; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/2.cc index ea852ecb882..e672f3c4173 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/2.cc @@ -27,8 +27,6 @@ void test02() { - bool test __attribute__((unused)) = true; - using namespace std; wstring one = L"Selling England by the pound"; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/3.cc index 0b1e2d71b27..3f63faac409 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/3.cc @@ -27,8 +27,6 @@ void test03() { - bool test __attribute__((unused)) = true; - using namespace std; wstring one; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc index 5fb7a64eef6..04e8f1b5b24 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc @@ -25,7 +25,6 @@ void test03() { - bool test __attribute__((unused)) = true; std::wstring_view str1(L"foo"); std::wstring str2; str2.assign(str1); @@ -39,8 +38,6 @@ test03() void test04() { - bool test __attribute__((unused)) = true; - std::wstring str(L"a"); wchar_t c = L'b'; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/move_assign.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/move_assign.cc index 2eb5e3da7c8..322ffbbdb82 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/move_assign.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/assign/wchar_t/move_assign.cc @@ -28,8 +28,6 @@ void test01() { - bool test __attribute__((unused)) = true; - std::wstring a, b; a.push_back(L'1'); b.assign(std::move(a)); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/1.cc index 43dccf3f11f..e63d76ef10a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/1.cc @@ -23,9 +23,8 @@ #include #include -int test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::iterator citerator; csize_type csz01, csz02; @@ -178,7 +177,6 @@ int test01(void) csz01 = str03.size(); str03.insert(str03.end(), str01.begin(), str01.end()); VERIFY( str03 == "baker beach, san franciscorodeo beach, marin" ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/2.cc index fe829964723..86451d9ba58 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/2.cc @@ -26,10 +26,8 @@ // string& insert(size_type __p, const char* s, size_type n); // string& insert(size_type __p, const char* s); // but now s points inside the _Rep -int test02(void) +void test02(void) { - bool test __attribute__((unused)) = true; - std::string str01; const char* title = "Everything was beautiful, and nothing hurt"; // Increasing size: str01 is reallocated every time. @@ -72,7 +70,6 @@ int test02(void) str01.insert(0, str01.c_str()); VERIFY( str01 == "Everything was beautiful, and nothing hurt" "Everything was beautiful, and nothing hurt"); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/3.cc index 7ebbb33fced..c33a9e3587a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/3.cc @@ -25,7 +25,6 @@ void test03() { - bool test __attribute__((unused)) = true; std::string_view str1("foo"); std::string str2; str2.insert(0, str1); @@ -43,8 +42,6 @@ test03() void test04() { - bool test __attribute__((unused)) = true; - std::string str("a"); char c = 'b'; str.insert(0, &c, 1); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/wchar_t/1.cc index 30c0770acc9..982d3c31eef 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/wchar_t/1.cc @@ -23,9 +23,8 @@ #include #include -int test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::iterator citerator; csize_type csz01, csz02; @@ -178,7 +177,6 @@ int test01(void) csz01 = str03.size(); str03.insert(str03.end(), str01.begin(), str01.end()); VERIFY( str03 == L"baker beach, san franciscorodeo beach, marin" ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/wchar_t/2.cc index fc9ee9193a7..bbb7de2b10e 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/wchar_t/2.cc @@ -26,10 +26,8 @@ // wstring& insert(size_type __p, const wchar_t* s, size_type n); // wstring& insert(size_type __p, const wchar_t* s); // but now s points inside the _Rep -int test02(void) +void test02(void) { - bool test __attribute__((unused)) = true; - std::wstring str01; const wchar_t* title = L"Everything was beautiful, and nothing hurt"; // Increasing size: str01 is reallocated every time. @@ -72,7 +70,6 @@ int test02(void) str01.insert(0, str01.c_str()); VERIFY( str01 == L"Everything was beautiful, and nothing hurt" L"Everything was beautiful, and nothing hurt"); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc index 5d2587c8d00..1b5569869dd 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc @@ -25,7 +25,6 @@ void test03() { - bool test __attribute__((unused)) = true; std::wstring_view str1(L"foo"); std::wstring str2; str2.insert(0, str1); @@ -43,8 +42,6 @@ test03() void test04() { - bool test __attribute__((unused)) = true; - std::wstring str(L"a"); wchar_t c = L'b'; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/pop_back/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/pop_back/char/1.cc index d5cd2a1c30e..8930d450730 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/pop_back/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/pop_back/char/1.cc @@ -23,8 +23,6 @@ void test01() { - bool test __attribute__((unused)) = true; - const std::string cstr("Badger"); std::string str = cstr; str.pop_back(); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t/1.cc index 22a46c3d023..869200c534e 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t/1.cc @@ -23,8 +23,6 @@ void test01() { - bool test __attribute__((unused)) = true; - const std::wstring cstr(L"Badger"); std::wstring str = cstr; str.pop_back(); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/1.cc index a02d1e55da9..b5961f8d056 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/1.cc @@ -23,9 +23,8 @@ #include // for std::find #include -bool test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::const_reference cref; typedef std::string::reference ref; @@ -71,7 +70,6 @@ bool test01(void) std::find(x.rbegin(), x.rend(), 'l').base(), ar, ar + sizeof(ar) / sizeof(ar[0])); VERIFY( x == "jeHelloo" ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/2.cc index 510df8ec277..e1b50c10ebb 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/2.cc @@ -25,7 +25,6 @@ void test02() { - bool test __attribute__((unused)) = true; const char* strlit = "../the long pier/Hanalei Bay/Kauai/Hawaii"; std::string aux = strlit; aux.replace(aux.begin()+5, aux.begin()+20, diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/3.cc index dcdc36a44ba..e1c171983f8 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/3.cc @@ -26,7 +26,6 @@ void test03() { - bool test __attribute__((unused)) = true; const char* title01 = "nine types of ambiguity"; const char* title02 = "ultra"; std::string str01 = title01; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/4.cc index eff9660df4b..cff071df93b 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/4.cc @@ -28,7 +28,6 @@ void test04() { - bool test __attribute__((unused)) = true; std::string str01 = "geogaddi"; std::string str02; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/5.cc index f751fac1f06..0a3f5e0cc4e 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/5.cc @@ -27,7 +27,6 @@ void test05() { - bool test __attribute__((unused)) = true; std::string str01 = "londinium"; std::string str02 = "cydonia"; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/6.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/6.cc index edfe617538c..75a6a4890bc 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/6.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/6.cc @@ -24,8 +24,6 @@ void test01() { - bool test __attribute__((unused)) = true; - std::string str01("Valle Del Salto"); str01.replace(0, 5, str01.data() + 10, 5); VERIFY( str01 == "Salto Del Salto" ); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/7.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/7.cc index afefa84fc5d..3d55bb80dc2 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/7.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/char/7.cc @@ -25,7 +25,6 @@ void test03() { - bool test __attribute__((unused)) = true; std::string_view str1("foo"); std::string str2("bar"); str2.replace(0, 3, str1); @@ -51,8 +50,6 @@ test03() void test04() { - bool test __attribute__((unused)) = true; - std::string str("a"); char c = 'b'; str.replace(0, 1, &c, 1); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/1.cc index ea36e5102c5..9ca75126603 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/1.cc @@ -23,9 +23,8 @@ #include // for std::find #include -bool test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::const_reference cref; typedef std::wstring::reference ref; @@ -71,7 +70,6 @@ bool test01(void) std::find(x.rbegin(), x.rend(), L'l').base(), ar, ar + sizeof(ar) / sizeof(ar[0])); VERIFY( x == L"jeHelloo" ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/2.cc index 7469951a72d..6baf86303bb 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/2.cc @@ -26,7 +26,6 @@ void test02() { - bool test __attribute__((unused)) = true; const wchar_t* strlit = L"../the long pier/Hanalei Bay/Kauai/Hawaii"; std::wstring aux = strlit; aux.replace(aux.begin()+5, aux.begin()+20, diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/3.cc index ba01d1bf6f6..4a6033be505 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/3.cc @@ -26,7 +26,6 @@ void test03() { - bool test __attribute__((unused)) = true; const wchar_t* title01 = L"nine types of ambiguity"; const wchar_t* title02 = L"ultra"; std::wstring str01 = title01; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/4.cc index a313d1ab269..109c4c307c3 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/4.cc @@ -28,7 +28,6 @@ void test04() { - bool test __attribute__((unused)) = true; std::wstring str01 = L"geogaddi"; std::wstring str02; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/5.cc index 93fae0c90d1..cf93370c42e 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/5.cc @@ -27,7 +27,6 @@ void test05() { - bool test __attribute__((unused)) = true; std::wstring str01 = L"londinium"; std::wstring str02 = L"cydonia"; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/6.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/6.cc index e12441c648c..61e7f35d3d9 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/6.cc @@ -24,8 +24,6 @@ void test01() { - bool test __attribute__((unused)) = true; - std::wstring str01(L"Valle Del Salto"); str01.replace(0, 5, str01.data() + 10, 5); VERIFY( str01 == L"Salto Del Salto" ); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc index 692c52ddcb2..018115101bb 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc @@ -25,7 +25,6 @@ void test03() { - bool test __attribute__((unused)) = true; std::wstring_view str1(L"foo"); std::wstring str2(L"bar"); str2.replace(0, 3, str1); @@ -51,8 +50,6 @@ test03() void test04() { - bool test __attribute__((unused)) = true; - std::wstring str(L"a"); wchar_t c = L'b'; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc index 6c4cb9e9b80..af9a893aeda 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc @@ -26,7 +26,6 @@ // DR 1261. Insufficient overloads for to_string / to_wstring void test01() { - bool test __attribute__((unused)) = true; using namespace std; const string one(to_string(-2)); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc index 39b96b67998..7e7c1347eab 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc @@ -30,7 +30,8 @@ void test01() { - bool test __attribute__((unused)) = false; + bool test = false; + using namespace std; try diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc index 4108691c761..976deaeb75a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc @@ -30,7 +30,7 @@ void test01() { - bool test __attribute__((unused)) = false; + bool test = false; using namespace std; try diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc index b039c481db8..669dfc71d3a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc @@ -30,7 +30,7 @@ void test01() { - bool test __attribute__((unused)) = false; + bool test = false; using namespace std; try diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc index 0322fcd461f..40ddbacffa1 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc @@ -30,7 +30,7 @@ void test01() { - bool test __attribute__((unused)) = false; + bool test = false; using namespace std; try diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc index 05a6384a287..15a4dcaddb4 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc @@ -30,7 +30,7 @@ void test01() { - bool test __attribute__((unused)) = false; + bool test = false; using namespace std; try diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc index 579d550dae4..9060f5c538f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc @@ -30,7 +30,7 @@ void test01() { - bool test __attribute__((unused)) = false; + bool test = false; using namespace std; try diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc index 77b398460fc..d5ec6a99d44 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc @@ -30,7 +30,7 @@ void test01() { - bool test __attribute__((unused)) = false; + bool test = false; using namespace std; try diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc index 3c1b2b722de..49545a40229 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc @@ -30,7 +30,7 @@ void test01() { - bool test __attribute__((unused)) = false; + bool test = false; using namespace std; try diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/to_string.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/to_string.cc index 4205a2a2f4f..adca24ec2e4 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/to_string.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/to_string.cc @@ -28,7 +28,7 @@ void test01() { - bool test __attribute__((unused)) = true; + bool test = true; using namespace std; long long ll1 = -2; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/dr1261.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/dr1261.cc index abeb0c3e01a..90b1b2e6793 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/dr1261.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/dr1261.cc @@ -26,7 +26,6 @@ // DR 1261. Insufficient overloads for to_string / to_wstring void test01() { - bool test __attribute__((unused)) = true; using namespace std; const wstring one(to_wstring(-2)); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc index bd64cc2d250..81735dd1866 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc @@ -31,7 +31,7 @@ test01() { #if _GLIBCXX_USE_C99_WCHAR - bool test __attribute__((unused)) = false; + bool test = false; using namespace std; try diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc index 4d602ce9a2c..2da738c3f22 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc @@ -31,7 +31,7 @@ test01() { #if _GLIBCXX_USE_C99_WCHAR - bool test __attribute__((unused)) = false; + bool test = false; using namespace std; try diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc index 6e3ca6fe14a..284203a47c2 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc @@ -31,7 +31,7 @@ test01() { #if _GLIBCXX_USE_C99_WCHAR - bool test __attribute__((unused)) = false; + bool test = false; using namespace std; try diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc index fe6b5bf0b70..f1569b81ae8 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc @@ -31,7 +31,7 @@ test01() { #if _GLIBCXX_USE_C99_WCHAR - bool test __attribute__((unused)) = false; + bool test = false; using namespace std; try diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc index 79bae37a5ec..82b8c8bb846 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc @@ -31,7 +31,7 @@ test01() { #if _GLIBCXX_USE_C99_WCHAR - bool test __attribute__((unused)) = false; + bool test = false; using namespace std; try diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc index 36f092285dd..c7209a4a5a6 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc @@ -31,7 +31,7 @@ test01() { #if _GLIBCXX_USE_C99_WCHAR - bool test __attribute__((unused)) = false; + bool test = false; using namespace std; try diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc index a7a6838005a..5b76f81dc73 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc @@ -31,7 +31,7 @@ test01() { #if _GLIBCXX_USE_C99_WCHAR - bool test __attribute__((unused)) = false; + bool test = false; using namespace std; try diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc index dfa5784971a..dd6e92deee1 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc @@ -31,7 +31,7 @@ test01() { #if _GLIBCXX_USE_C99_WCHAR - bool test __attribute__((unused)) = false; + bool test = false; using namespace std; try diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/to_wstring.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/to_wstring.cc index cbfc1b8b976..802791c8630 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/to_wstring.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/to_wstring.cc @@ -29,7 +29,6 @@ test01() { #if _GLIBCXX_USE_C99_WCHAR - bool test __attribute__((unused)) = true; using namespace std; long long ll1 = -2; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/1.cc index 7fe30a7ea7f..8b7ff864fc5 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/1.cc @@ -41,7 +41,6 @@ test_value(int result, want_value expected); int test_value(int result, want_value expected) { - bool test __attribute__((unused)) = true; bool pass = false; switch (expected) { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/13650.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/13650.cc index 6ba24cb8c71..e33ab21b415 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/13650.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/13650.cc @@ -26,7 +26,6 @@ void test01() { using namespace std; - bool test __attribute__((unused)) = true; const char lit_01[] = { 'w', 'e', '\0', 'r', 'd' }; const char lit_02[] = { 'w', 'e', 'i', '\0', 'd' }; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/2.cc index 08b3f0c378b..bc34a2f7528 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/char/2.cc @@ -25,7 +25,6 @@ void test03() { - bool test __attribute__((unused)) = true; std::string_view str1("foobar"); std::string str2("foobar"); @@ -53,8 +52,6 @@ test03() void test04() { - bool test __attribute__((unused)) = true; - const std::string str("a"); char c = 'a'; int res = str.compare(0, 1, &c, 1); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/1.cc index 48fe93c97b1..1a28ad77626 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/1.cc @@ -40,7 +40,6 @@ test_value(int result, want_value expected); int test_value(int result, want_value expected) { - bool test __attribute__((unused)) = true; bool pass = false; switch (expected) { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/13650.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/13650.cc index bcdbf9c9ccb..7e7657cca37 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/13650.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/13650.cc @@ -26,7 +26,6 @@ void test01() { using namespace std; - bool test __attribute__((unused)) = true; const wchar_t lit_01[] = { L'w', L'e', L'\0', L'r', L'd' }; const wchar_t lit_02[] = { L'w', L'e', L'i', L'\0', L'd' }; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc index d79dcd59a87..5019479ba1c 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc @@ -25,7 +25,6 @@ void test03() { - bool test __attribute__((unused)) = true; std::wstring_view str1(L"foobar"); std::wstring str2(L"foobar"); @@ -53,8 +52,6 @@ test03() void test04() { - bool test __attribute__((unused)) = true; - const std::wstring str(L"a"); wchar_t c = L'a'; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/char/1.cc index 6fd3d9b62cd..668424d0cf5 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/char/1.cc @@ -22,8 +22,6 @@ int test01(void) { - bool test __attribute__((unused)) = true; - std::string empty; // data() for size == 0 is non-NULL. diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/wchar_t/1.cc index 97b5d4afcec..8b98407bde6 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/data/wchar_t/1.cc @@ -22,8 +22,6 @@ int test01(void) { - bool test __attribute__((unused)) = true; - std::wstring empty; // data() for size == 0 is non-NULL. diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/1.cc index 4bda859de99..bc37f4da1d6 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/1.cc @@ -22,9 +22,8 @@ #include #include -bool test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::const_reference cref; typedef std::string::reference ref; @@ -83,7 +82,6 @@ bool test01(void) VERIFY( csz01 == csz02 ); csz01 = str01.find('/'); VERIFY( csz01 == npos ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/2.cc index aea3462d08e..85d4f3a77c3 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/2.cc @@ -22,9 +22,8 @@ #include #include -bool test02(void) +void test02(void) { - bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; csize_type npos = std::string::npos; csize_type csz01, csz02; @@ -82,7 +81,6 @@ bool test02(void) csz01 = str01.find_first_of('z'); csz02 = str01.size() - 1; VERIFY( csz01 == csz02 ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/3.cc index 7fee95b85a7..d2324c6ecec 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/3.cc @@ -22,9 +22,8 @@ #include #include -bool test03(void) +void test03(void) { - bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; csize_type npos = std::string::npos; csize_type csz01; @@ -82,7 +81,6 @@ bool test03(void) VERIFY( csz01 == 0 ); csz01 = str04.find_first_not_of('S'); VERIFY( csz01 == npos ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/4.cc index bc0e6b29c75..52641b3af46 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/4.cc @@ -25,7 +25,6 @@ // libstdc++/31401 void test01() { - bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; csize_type npos = std::string::npos; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/5.cc index 930c61a9b5f..683c708048d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/char/5.cc @@ -30,7 +30,6 @@ void test03() { - bool test __attribute__((unused)) = true; std::string_view str1("bar"); std::string str2("foobar"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/1.cc index c6788c2b48d..7dd9250c47d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/1.cc @@ -22,9 +22,8 @@ #include #include -bool test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::const_reference cref; typedef std::wstring::reference ref; @@ -83,7 +82,6 @@ bool test01(void) VERIFY( csz01 == csz02 ); csz01 = str01.find(L'/'); VERIFY( csz01 == npos ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/2.cc index 0954d3ff281..affd19f22ff 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/2.cc @@ -22,9 +22,8 @@ #include #include -bool test02(void) +void test02(void) { - bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; csize_type npos = std::wstring::npos; csize_type csz01, csz02; @@ -82,7 +81,6 @@ bool test02(void) csz01 = str01.find_first_of(L'z'); csz02 = str01.size() - 1; VERIFY( csz01 == csz02 ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/3.cc index 156148e4e85..c0081f7a17d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/3.cc @@ -22,9 +22,8 @@ #include #include -bool test03(void) +void test03(void) { - bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; csize_type npos = std::wstring::npos; csize_type csz01; @@ -82,7 +81,6 @@ bool test03(void) VERIFY( csz01 == 0 ); csz01 = str04.find_first_not_of(L'S'); VERIFY( csz01 == npos ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/4.cc index 08b3641e9dd..e8c1835f1b6 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/4.cc @@ -25,7 +25,6 @@ // libstdc++/31401 void test01() { - bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; csize_type npos = std::wstring::npos; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc index 701cc4cca1b..77a1c967b56 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc @@ -30,7 +30,6 @@ void test03() { - bool test __attribute__((unused)) = true; std::wstring_view str1(L"bar"); std::wstring str2(L"foobar"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/char/1.cc index 752750fcd0e..035ce461426 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/char/1.cc @@ -21,9 +21,8 @@ #include // 21.3.6.2 basic_string rfind -bool test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::const_reference cref; typedef std::string::reference ref; @@ -82,7 +81,6 @@ bool test01(void) VERIFY( csz01 == csz02 ); csz01 = str01.rfind('/'); VERIFY( csz01 == npos ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/char/2.cc index 23b70510a28..06ca503d46c 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/char/2.cc @@ -21,9 +21,8 @@ #include // 21.3.6.4 basic_string::find_last_of -bool test02() +void test02() { - bool test __attribute__((unused)) = true; std::string z("ab"); std::string::size_type pos; pos = z.find_last_of("ab"); @@ -40,7 +39,6 @@ bool test02() VERIFY( pos == 1 ); pos = z.find_last_of('X'); VERIFY( pos == std::string::npos ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/char/3.cc index 68b413273e6..661be5a80b7 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/char/3.cc @@ -21,9 +21,8 @@ #include // 21.3.6.6 basic_string::find_last_not_of -bool test03() +void test03() { - bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; std::string::size_type pos; csize_type npos = std::string::npos; @@ -55,7 +54,6 @@ bool test03() VERIFY( pos == 0 ); pos = z.find_last_not_of("Xa"); VERIFY( pos == 1 ); - return test; } int main() { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/wchar_t/1.cc index 06e833a2ee6..d9c762792b0 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/wchar_t/1.cc @@ -21,9 +21,8 @@ #include // 21.3.6.2 basic_string rfind -bool test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::const_reference cref; typedef std::wstring::reference ref; @@ -82,7 +81,6 @@ bool test01(void) VERIFY( csz01 == csz02 ); csz01 = str01.rfind(L'/'); VERIFY( csz01 == npos ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/wchar_t/2.cc index af384bb9476..e977a6d8517 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/wchar_t/2.cc @@ -21,9 +21,8 @@ #include // 21.3.6.4 basic_string::find_last_of -bool test02() +void test02() { - bool test __attribute__((unused)) = true; std::wstring::size_type pos; std::wstring z(L"ab"); pos = z.find_last_of(L"ab"); @@ -40,7 +39,6 @@ bool test02() VERIFY( pos == 1 ); pos = z.find_last_of(L'X'); VERIFY( pos == std::wstring::npos ); - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/wchar_t/3.cc index 0acd72fd843..33f277a4243 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/rfind/wchar_t/3.cc @@ -21,9 +21,8 @@ #include // 21.3.6.6 basic_string::find_last_not_of -bool test03() +void test03() { - bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; std::wstring::size_type pos; csize_type npos = std::wstring::npos; @@ -55,7 +54,6 @@ bool test03() VERIFY( pos == 0 ); pos = z.find_last_not_of(L"Xa"); VERIFY( pos == 1 ); - return test; } int main() { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/substr/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/substr/char/1.cc index ecc7296eb0b..76041208e21 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/substr/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/substr/char/1.cc @@ -23,9 +23,8 @@ #include #include -bool test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::string::size_type csize_type; typedef std::string::const_reference cref; typedef std::string::reference ref; @@ -64,7 +63,6 @@ bool test01(void) catch(...) { VERIFY( false ); } - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/substr/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/substr/wchar_t/1.cc index 28020dc87f8..2e18c7d14b4 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/substr/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/substr/wchar_t/1.cc @@ -23,9 +23,8 @@ #include #include -bool test01(void) +void test01(void) { - bool test __attribute__((unused)) = true; typedef std::wstring::size_type csize_type; typedef std::wstring::const_reference cref; typedef std::wstring::reference ref; @@ -64,7 +63,6 @@ bool test01(void) catch(...) { VERIFY( false ); } - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/1.cc index d51e08cd69c..f6aa4eef9a3 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/1.cc @@ -25,8 +25,6 @@ int test01(void) { - bool test __attribute__((unused)) = true; - std::string str1; std::string str2; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/2.cc index 3ba112f1764..856c85c2f90 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/2.cc @@ -114,7 +114,6 @@ template int test01(void) { - bool test __attribute__((unused)) = true; std::string str_0("costa rica"); std::string str_1("costa marbella"); std::string str_2("cost"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/3.cc index d88aeeb6f24..4ae0b65af4a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/3.cc @@ -25,7 +25,6 @@ void test01() { - bool test __attribute__((unused)) = true; using std::string; VERIFY( (string("abc") + string("def") diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/4.cc index ca3b75d98e3..d37f01b7f2d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/4.cc @@ -25,7 +25,6 @@ void test01() { - bool test __attribute__((unused)) = true; using std::string; using std::move; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/5.cc index 33520ba85a7..d30a30804e5 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/5.cc @@ -24,8 +24,6 @@ int test01(void) { - bool test __attribute__((unused)) = true; - std::string_view str1("foo");; std::string str2; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/1.cc index 064d71d4320..9841632de3f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/1.cc @@ -25,8 +25,6 @@ int test01(void) { - bool test __attribute__((unused)) = true; - std::wstring str1; std::wstring str2; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/2.cc index 97877539c34..e22aed2e989 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/2.cc @@ -114,7 +114,6 @@ template int test01(void) { - bool test __attribute__((unused)) = true; std::wstring str_0(L"costa rica"); std::wstring str_1(L"costa marbella"); std::wstring str_2(L"cost"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/3.cc index 37ac3f6ce5d..362b618b443 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/3.cc @@ -25,7 +25,6 @@ void test01() { - bool test __attribute__((unused)) = true; using std::wstring; VERIFY( (wstring(L"abc") + wstring(L"def") diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/4.cc index 16e45ba46a7..292d917fdd1 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/4.cc @@ -25,7 +25,6 @@ void test01() { - bool test __attribute__((unused)) = true; using std::wstring; using std::move; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/5.cc index 235025306ca..619a29b94c6 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/5.cc @@ -24,8 +24,6 @@ int test01(void) { - bool test __attribute__((unused)) = true; - std::wstring_view str1(L"foo");; std::wstring str2; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/capacity/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/capacity/1.cc index 74baee3e1f1..7e13adc5b99 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/capacity/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/capacity/1.cc @@ -126,8 +126,6 @@ namespace std void test01() { - bool test [[gnu::unused]] = true; - std::basic_string_view> str02; typedef std::basic_string_view< A >::size_type size_type_o; size_type_o sz03; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/1.cc index 0534bfb4c88..ba07a3e80f9 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/1.cc @@ -27,7 +27,6 @@ void test01() { - bool test [[gnu::unused]] = true; typedef std::string_view::size_type csize_type; // basic_string_view() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/2.cc index 331dd426625..275b33ab31a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/2.cc @@ -27,7 +27,6 @@ void test03() { - bool test [[gnu::unused]] = true; const char* with_nulls = "This contains \0 a zero byte."; // These are tests to see how basic_string_view handles data with NUL diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/3.cc index 604adedd817..6a9b96d5f0e 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/char/3.cc @@ -26,8 +26,6 @@ void test05() { - bool test [[gnu::unused]] = true; - char const * s = 0; std::string_view zero_length_built_with_NULL(s, 0); } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc index ba8bb9037ef..09865711e3b 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc @@ -27,7 +27,6 @@ void test01() { - bool test [[gnu::unused]] = true; typedef std::wstring_view::size_type csize_type; // basic_string_view() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc index 7dbc60c66c2..443297244d5 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc @@ -25,7 +25,6 @@ void test03() { - bool test [[gnu::unused]] = true; const wchar_t* with_nulls = L"This contains \0 a zero byte."; // These are tests to see how basic_string_view handles data with NUL diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc index 4fed4e222d8..26550df582b 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc @@ -25,8 +25,6 @@ void test05() { - bool test [[gnu::unused]] = true; - wchar_t const * s = 0; std::wstring_view zero_length_built_with_NULL(s, 0); } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/1.cc index 1638b0e1104..714fccdd788 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/1.cc @@ -23,11 +23,9 @@ #include #include -bool +void test01() { - bool test [[gnu::unused]] = true; - typedef std::string_view::size_type csize_type; typedef std::string_view::const_reference cref; typedef std::string_view::reference ref; @@ -62,8 +60,6 @@ test01() { VERIFY( false ); } - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/empty.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/empty.cc index c0f820617d9..fad5eb798ba 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/empty.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/empty.cc @@ -24,8 +24,6 @@ int main() { - bool test [[gnu::unused]] = true; - { std::string_view empty; VERIFY( empty.empty() ); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/front_back.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/front_back.cc index 308d1e07f7b..4ae3dc4f831 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/front_back.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/char/front_back.cc @@ -24,8 +24,6 @@ void test01() { - bool test [[gnu::unused]] = true; - std::string_view str("ramifications"); const std::string_view cstr("melodien"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc index 7e035fe39cf..b16c5dba9ce 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc @@ -23,11 +23,9 @@ #include #include -bool +void test01() { - bool test [[gnu::unused]] = true; - typedef std::wstring_view::size_type csize_type; typedef std::wstring_view::const_reference cref; typedef std::wstring_view::reference ref; @@ -62,8 +60,6 @@ test01() { VERIFY( false ); } - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc index c8896e1b27f..7e2706c3e43 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc @@ -24,8 +24,6 @@ int main() { - bool test [[gnu::unused]] = true; - { std::wstring_view empty; VERIFY( empty.empty() ); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc index b3340619424..ce814d36665 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc @@ -24,8 +24,6 @@ void test01() { - bool test [[gnu::unused]] = true; - std::wstring_view str(L"ramifications"); const std::wstring_view cstr(L"melodien"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/1.cc index 7cef69487be..d205506ad26 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/1.cc @@ -30,11 +30,9 @@ #include #include -bool +void test01() { - bool test [[gnu::unused]] = true; - typedef std::string_view::size_type csize_type; typedef std::string_view::const_reference cref; typedef std::string_view::reference ref; @@ -56,8 +54,6 @@ test01() std::string_view hello_world; std::cout << hello_world; - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/2.cc index 441a40398c3..9a8ff0f5e42 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/2.cc @@ -37,7 +37,7 @@ void test05(std::size_t size) { - bool test [[gnu::unused]] = true; + bool test = true; const char filename[] = "inserters_extractors-2.txt"; const char fillc = 'f'; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/3.cc index 9a8e814bbcc..230445c4450 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/char/3.cc @@ -32,8 +32,6 @@ void test09() { - bool test [[gnu::unused]] = true; - std::string_view foo{"peace\0\0\0& love"}; std::ostringstream oss1; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc index 27a52f90c80..cac91562e70 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc @@ -37,8 +37,6 @@ test01() typedef basic_stringbuf stringbuf_type; typedef basic_ostream ostream_type; - bool test [[gnu::unused]] = true; - string_type str; stringbuf_type strbuf01; ostream_type stream(&strbuf01); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc index 37af0bc1054..a53f5de0b01 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc @@ -30,11 +30,9 @@ #include #include -bool +void test01() { - bool test [[gnu::unused]] = true; - typedef std::wstring_view::size_type csize_type; typedef std::wstring_view::const_reference cref; typedef std::wstring_view::reference ref; @@ -61,8 +59,6 @@ test01() std::wstring_view hello_world; std::wcout << hello_world; - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc index 86fe7278547..27f952dcbe0 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc @@ -35,7 +35,7 @@ void test05(std::size_t size) { - bool test [[gnu::unused]] = true; + bool test = true; const char filename[] = "inserters_extractors-2.txt"; const wchar_t fillc = L'f'; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc index e3af23cf287..01a25fec7fc 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc @@ -31,8 +31,6 @@ void test09() { - bool test [[gnu::unused]] = true; - std::wstring_view foo{L"peace\0\0\0& love"}; std::wostringstream oss1; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc index 5f2bd755af9..476b289cb26 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc @@ -23,8 +23,6 @@ void test01() { - bool test [[gnu::unused]] = true; - using std::string_view; string_view str0{"olympus mons"}; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc index 2f7169431c6..cbf7640d8f1 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc @@ -23,8 +23,6 @@ void test01() { - bool test [[gnu::unused]] = true; - using std::wstring_view; wstring_view str0{L"olympus mons"}; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc index a6eb5c52a5d..eb67a445f62 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc @@ -23,8 +23,6 @@ void test01() { - bool test [[gnu::unused]] = true; - using std::string_view; string_view str0{"olympus mons"}; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc index 3162e2bbc06..e8d3d3ed62c 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc @@ -23,8 +23,6 @@ void test01() { - bool test [[gnu::unused]] = true; - using std::wstring_view; wstring_view str0{L"olympus mons"}; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/1.cc index 28e2514d016..9fdc13b4416 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/1.cc @@ -41,7 +41,6 @@ test_value(int result, want_value expected); int test_value(int result, want_value expected) { - bool test [[gnu::unused]] = true; bool pass = false; switch (expected) { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc index 9e22a46b00b..629f3ccca64 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc @@ -26,8 +26,6 @@ void test01() { - bool test [[gnu::unused]] = true; - using std::string_view; const char lit_01[]{ 'w', 'e', '\0', 'r', 'd' }; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc index 8bf70ec79d7..02513723e0d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc @@ -40,7 +40,6 @@ test_value(int result, want_value expected); int test_value(int result, want_value expected) { - bool test [[gnu::unused]] = true; bool pass = false; switch (expected) { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc index fc3c197ca8b..fbdb7d3c885 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc @@ -26,8 +26,6 @@ void test01() { - bool test [[gnu::unused]] = true; - using std::wstring_view; const wchar_t lit_01[] = { L'w', L'e', L'\0', L'r', L'd' }; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/1.cc index a583e13a2b1..955d1fb551c 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/1.cc @@ -25,8 +25,6 @@ bool test01() { - bool test [[gnu::unused]] = true; - typedef std::string_view::size_type csize_type; const char str_lit01[] = "123456789A"; @@ -36,8 +34,6 @@ test01() csize_type len = str01.copy(buffer, sizeof(buffer), 8); VERIFY( 2 == len ); VERIFY( '9' == buffer[0] ); - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc index 94fa0d43083..54d1667afdb 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc @@ -25,8 +25,6 @@ bool test01() { - bool test [[gnu::unused]] = true; - typedef std::wstring_view::size_type csize_type; csize_type csz01; @@ -37,8 +35,6 @@ test01() csize_type len = str01.copy(buffer, sizeof(buffer), 8); VERIFY( 2 == len ); VERIFY( L'9' == buffer[0] ); - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/data/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/data/char/1.cc index 63eba230ffa..18fc9f5fe88 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/data/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/data/char/1.cc @@ -25,8 +25,6 @@ int test01() { - bool test [[gnu::unused]] = true; - std::string_view empty; VERIFY( empty.size() == 0 ); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc index 86da7df69b0..6596db52899 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc @@ -25,8 +25,6 @@ int test01() { - bool test [[gnu::unused]] = true; - std::wstring_view empty; VERIFY( empty.size() == 0 ); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/1.cc index 835c78b3897..8a77c767dc3 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/1.cc @@ -22,11 +22,9 @@ #include #include -bool +void test01() { - bool test [[gnu::unused]] = true; - typedef std::string_view::size_type csize_type; typedef std::string_view::const_reference cref; typedef std::string_view::reference ref; @@ -85,8 +83,6 @@ test01() VERIFY( csz01 == csz02 ); csz01 = str01.find('/'); VERIFY( csz01 == npos ); - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/2.cc index 4417bfe7a3d..c112414ded5 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/2.cc @@ -22,11 +22,9 @@ #include #include -bool +void test02() { - bool test [[gnu::unused]] = true; - typedef std::string_view::size_type csize_type; csize_type npos = std::string_view::npos; csize_type csz01, csz02; @@ -84,8 +82,6 @@ test02() csz01 = str01.find_first_of('z'); csz02 = str01.size() - 1; VERIFY( csz01 == csz02 ); - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/3.cc index 4861065042c..cf5014b0820 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/3.cc @@ -22,11 +22,9 @@ #include #include -bool +void test03() { - bool test [[gnu::unused]] = true; - typedef std::string_view::size_type csize_type; csize_type npos = std::string_view::npos; csize_type csz01; @@ -84,8 +82,6 @@ test03() VERIFY( csz01 == 0 ); csz01 = str04.find_first_not_of('S'); VERIFY( csz01 == npos ); - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/4.cc index 6d491224808..9391a22b607 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/char/4.cc @@ -26,8 +26,6 @@ void test01() { - bool test [[gnu::unused]] = true; - typedef std::string_view::size_type csize_type; csize_type npos = std::string_view::npos; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc index fb147a0a838..e15af9e829e 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc @@ -22,11 +22,9 @@ #include #include -bool +void test01() { - bool test [[gnu::unused]] = true; - typedef std::wstring_view::size_type csize_type; typedef std::wstring_view::const_reference cref; typedef std::wstring_view::reference ref; @@ -85,8 +83,6 @@ test01() VERIFY( csz01 == csz02 ); csz01 = str01.find(L'/'); VERIFY( csz01 == npos ); - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc index 0373a9c429e..a533e13783f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc @@ -22,11 +22,9 @@ #include #include -bool +void test02() { - bool test [[gnu::unused]] = true; - typedef std::wstring_view::size_type csize_type; csize_type npos = std::wstring_view::npos; csize_type csz01, csz02; @@ -84,8 +82,6 @@ test02() csz01 = str01.find_first_of(L'z'); csz02 = str01.size() - 1; VERIFY( csz01 == csz02 ); - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc index 82357b807d1..4faee2e3550 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc @@ -22,11 +22,9 @@ #include #include -bool +void test03() { - bool test [[gnu::unused]] = true; - typedef std::wstring_view::size_type csize_type; csize_type npos = std::wstring_view::npos; csize_type csz01; @@ -84,8 +82,6 @@ test03() VERIFY( csz01 == 0 ); csz01 = str04.find_first_not_of(L'S'); VERIFY( csz01 == npos ); - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc index 95671de5292..aa9b6cc7533 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc @@ -26,8 +26,6 @@ void test01() { - bool test [[gnu::unused]] = true; - typedef std::wstring_view::size_type csize_type; csize_type npos = std::wstring_view::npos; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc index 1f886e72138..f9e1bf14432 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc @@ -22,11 +22,9 @@ // basic_string_view rfind -bool +void test01() { - bool test [[gnu::unused]] = true; - typedef std::string_view::size_type csize_type; typedef std::string_view::const_reference cref; typedef std::string_view::reference ref; @@ -85,8 +83,6 @@ test01() VERIFY( csz01 == csz02 ); csz01 = str01.rfind('/'); VERIFY( csz01 == npos ); - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc index 49232f8ba61..3b2c30ab41b 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc @@ -22,11 +22,9 @@ // basic_string_view::find_last_of -bool +void test02() { - bool test [[gnu::unused]] = true; - std::string_view z("ab"); std::string_view::size_type pos; pos = z.find_last_of("ab"); @@ -43,8 +41,6 @@ test02() VERIFY( pos == 1 ); pos = z.find_last_of('X'); VERIFY( pos == std::string_view::npos ); - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc index ecd34001d80..471a0c802dd 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc @@ -22,11 +22,9 @@ // basic_string_view::find_last_not_of -bool +void test03() { - bool test [[gnu::unused]] = true; - typedef std::string_view::size_type csize_type; std::string_view::size_type pos; csize_type npos = std::string_view::npos; @@ -58,8 +56,6 @@ test03() VERIFY( pos == 0 ); pos = z.find_last_not_of("Xa"); VERIFY( pos == 1 ); - - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc index ee28bdc8417..7eff92c488a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc @@ -22,11 +22,9 @@ // basic_string_view rfind -bool +void test01() { - bool test [[gnu::unused]] = true; - typedef std::wstring_view::size_type csize_type; typedef std::wstring_view::const_reference cref; typedef std::wstring_view::reference ref; @@ -85,8 +83,6 @@ test01() VERIFY( csz01 == csz02 ); csz01 = str01.rfind(L'/'); VERIFY( csz01 == npos ); - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc index 4f173ff12ae..2acdcd30212 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc @@ -22,11 +22,9 @@ // basic_string_view::find_last_of -bool +void test02() { - bool test [[gnu::unused]] = true; - std::wstring_view::size_type pos; std::wstring_view z(L"ab"); pos = z.find_last_of(L"ab"); @@ -43,8 +41,6 @@ test02() VERIFY( pos == 1 ); pos = z.find_last_of(L'X'); VERIFY( pos == std::wstring_view::npos ); - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc index 0b9ea548429..b2ade360b03 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc @@ -22,11 +22,9 @@ // basic_string_view::find_last_not_of -bool +void test03() { - bool test [[gnu::unused]] = true; - typedef std::wstring_view::size_type csize_type; std::wstring_view::size_type pos; csize_type npos = std::wstring_view::npos; @@ -58,8 +56,6 @@ test03() VERIFY( pos == 0 ); pos = z.find_last_not_of(L"Xa"); VERIFY( pos == 1 ); - - return test; } int main() diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc index 617877f46db..d904da54dd2 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc @@ -25,11 +25,9 @@ #include #include -bool +void test01() { - bool test [[gnu::unused]] = true; - const char str_lit[] = "123456789A"; const std::string_view sv(str_lit); char buffer[4] = { 0 }; @@ -44,8 +42,6 @@ test01() VERIFY( std::equal(s1.begin(), s1.end(), s2.begin(), s2.end()) ); auto s3 = static_cast(sv); VERIFY( s3 == s1 ); - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/char/1.cc index 08832cd9cb5..ab573e9c04e 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/char/1.cc @@ -23,11 +23,9 @@ #include #include -bool +void test01() { - bool test [[gnu::unused]] = true; - typedef std::string_view::size_type csize_type; typedef std::string_view::const_reference cref; typedef std::string_view::reference ref; @@ -70,8 +68,6 @@ test01() { VERIFY( false ); } - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc index d8e6cb03a5b..dfa656de0dd 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc @@ -23,11 +23,9 @@ #include #include -bool +void test01() { - bool test [[gnu::unused]] = true; - typedef std::wstring_view::size_type csize_type; typedef std::wstring_view::const_reference cref; typedef std::wstring_view::reference ref; @@ -70,8 +68,6 @@ test01() { VERIFY( false ); } - - return test; } int diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/char/2.cc index 04c02e9dfbe..e405593306a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/char/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/char/2.cc @@ -115,8 +115,6 @@ template int test01() { - bool test [[gnu::unused]] = true; - std::string_view str_0("costa rica"); std::string_view str_1("costa marbella"); std::string_view str_2("cost"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc index 5e9f7e4cb76..1b4e0f46f38 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc @@ -115,8 +115,6 @@ template int test01() { - bool test [[gnu::unused]] = true; - std::wstring_view str_0(L"costa rica"); std::wstring_view str_1(L"costa marbella"); std::wstring_view str_2(L"cost"); diff --git a/libstdc++-v3/testsuite/21_strings/c_strings/char/1.cc b/libstdc++-v3/testsuite/21_strings/c_strings/char/1.cc index 53462558e81..d36f0f33040 100644 --- a/libstdc++-v3/testsuite/21_strings/c_strings/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/c_strings/char/1.cc @@ -24,7 +24,6 @@ void test01() { - bool test __attribute__((unused)) = true; char c = 'a'; const char cc = 'b'; char* c1 = &c; diff --git a/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/1.cc index 0345f69b98e..67a00d58f56 100644 --- a/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/1.cc @@ -25,7 +25,6 @@ void test01() { - bool test __attribute__((unused)) = true; wchar_t c = L'a'; const wchar_t cc = L'b'; wchar_t* c1 = &c; diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc index 9a5f269835a..034ec1dcd24 100644 --- a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc @@ -24,7 +24,6 @@ void test01(void) { - bool test __attribute__((unused)) = true; const std::string str_01("zuma beach"); const std::string str_02("montara and ocean beach"); diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/57704.cc b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/57704.cc index 2c2f3b8d029..a4ec0c8f88c 100644 --- a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/57704.cc +++ b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/57704.cc @@ -20,8 +20,6 @@ void test01() { - bool test __attribute__((unused)) = true; - char a = '\x7f'; char b = '\x80'; diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc index 0a2d2ee1dc5..4309c646056 100644 --- a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc +++ b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc @@ -30,7 +30,6 @@ void test02(void) { typedef short char_type; - bool test __attribute__((unused)) = true; // 21.1.1 character traits requirements diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc index b4221a4592b..375aeffec54 100644 --- a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc @@ -24,7 +24,6 @@ void test02(void) { - bool test __attribute__((unused)) = true; const std::wstring str_01(L"zuma beach"); const std::wstring str_02(L"montara and ocean beach"); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get/char/1.cc index de6f06c922e..c35a812e0b8 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get/char/1.cc @@ -26,7 +26,7 @@ #include #include -#ifndef _GLIBCXX_ASSERT +#ifdef TEST_TIMEGET_VERBOSE # include # define PRINT(x) cout << #x << ": " << x << endl # define TESTHEAD(x) cout << x << endl diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get/char/2.cc index 3d8d6ef5c4e..20a8a10559a 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get/char/2.cc @@ -26,7 +26,7 @@ #include #include -#ifndef _GLIBCXX_ASSERT +#ifdef TEST_TIMEGET_VERBOSE # include # define PRINT(x) cout << #x << ": " << x << endl # define TESTHEAD(x) cout << x << endl diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get/wchar_t/1.cc index db8c06e7ffb..83830760a4e 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get/wchar_t/1.cc @@ -26,7 +26,7 @@ #include #include -#ifndef _GLIBCXX_ASSERT +#ifdef TEST_TIMEGET_VERBOSE # include # define PRINT(x) cout << #x << ": " << x << endl # define TESTHEAD(x) cout << x << endl diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get/wchar_t/2.cc index 48ddb397f27..3797e341fc4 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get/wchar_t/2.cc @@ -26,7 +26,7 @@ #include #include -#ifndef _GLIBCXX_ASSERT +#ifdef TEST_TIMEGET_VERBOSE # include # define PRINT(x) cout << #x << ": " << x << endl # define TESTHEAD(x) cout << x << endl diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4879.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4879.cc index 93c402eebf8..5c6bb871d82 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4879.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4879.cc @@ -34,9 +34,6 @@ #include #include -// No asserts, avoid leaking the semaphores if a VERIFY fails. -#undef _GLIBCXX_ASSERT - #include // libstdc++/2913, libstdc++/4879 @@ -46,7 +43,7 @@ test_04() { using namespace __gnu_test; - bool test __attribute__((unused)) = true; + bool test = true; const char* name = "tmp_fifo1"; semaphore s1, s2; @@ -92,7 +89,6 @@ test_04() if (!(ofs.rdstate() & std::ios::failbit)) { test = false; - VERIFY( test ); } unlink(name); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc index 0a095a3e289..106d1229d93 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc @@ -33,9 +33,6 @@ #include #include -// No asserts, avoid leaking the semaphores if a VERIFY fails. -#undef _GLIBCXX_ASSERT - #include // libstdc++/9964 @@ -43,7 +40,7 @@ bool test_07() { using namespace std; using namespace __gnu_test; - bool test __attribute__((unused)) = true; + bool test = true; semaphore s1, s2; const char* name = "tmp_fifo3"; @@ -54,7 +51,7 @@ bool test_07() mkfifo(name, S_IRWXU); int child = fork(); - VERIFY( child != -1 ); + test &= bool( child != -1 ); if (child == 0) { @@ -68,15 +65,15 @@ bool test_07() filebuf fb; filebuf* ret = fb.open(name, ios_base::in | ios_base::out); - VERIFY( ret != 0 ); - VERIFY( fb.is_open() ); + test &= bool( ret != 0 ); + test &= bool( fb.is_open() ); s1.signal(); s2.wait(); fb.sputc('a'); ret = fb.close(); - VERIFY( ret != 0 ); - VERIFY( !fb.is_open() ); + test &= bool( ret != 0 ); + test &= bool( !fb.is_open() ); return test; } diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc index fdd1a7e9e2f..ecda598d8b7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc @@ -29,15 +29,12 @@ #include #include -// No asserts, avoid leaking the semaphores if a VERIFY fails. -#undef _GLIBCXX_ASSERT - #include // libstdc++/13171 bool test01() { - bool test __attribute__((unused)) = true; + bool test = true; using namespace std; using namespace __gnu_test; @@ -66,11 +63,11 @@ bool test01() fb.pubimbue(loc_fr); fb.open(name, ios_base::in); s1.wait(); - VERIFY( fb.is_open() ); + test &= bool( fb.is_open() ); fb.pubimbue(loc_en); filebuf::int_type c = fb.sgetc(); fb.close(); - VERIFY( c == 'S' ); + test &= bool( c == 'S' ); s2.signal(); return test; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc index 2ed9a40d3b8..d9e7d7d6e53 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc @@ -30,9 +30,6 @@ #include #include -// No asserts, avoid leaking the semaphore if a VERIFY fails. -#undef _GLIBCXX_ASSERT - #include // libstdc++/14975 @@ -40,7 +37,7 @@ bool test01() { using namespace std; using namespace __gnu_test; - bool test __attribute__((unused)) = true; + bool test = true; locale loc_us = locale(ISO_8859(1,en_US)); @@ -53,7 +50,7 @@ bool test01() semaphore s1; int child = fork(); - VERIFY( child != -1 ); + test &= bool( child != -1 ); if (child == 0) { @@ -68,8 +65,8 @@ bool test01() wfilebuf fb; fb.pubimbue(loc_us); wfilebuf* ret = fb.open(name, ios_base::out); - VERIFY( ret != 0 ); - VERIFY( fb.is_open() ); + test &= bool( ret != 0 ); + test &= bool( fb.is_open() ); s1.wait(); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/26777.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/26777.cc index b0b49b15554..6748a610673 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/26777.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/26777.cc @@ -20,9 +20,6 @@ // with this library; see the file COPYING3. If not see // . -// No asserts, avoid leaking the semaphores if a VERIFY fails. -#undef _GLIBCXX_ASSERT - #include #include #include @@ -39,7 +36,7 @@ bool test01() using namespace std; using namespace __gnu_test; - bool test __attribute__((unused)) = true; + bool test = true; const char* name = "tmp_fifo6"; @@ -50,13 +47,13 @@ bool test01() semaphore s1, s2; int child = fork(); - VERIFY( child != -1 ); + test &= bool( child != -1 ); if (child == 0) { filebuf fbout; fbout.open(name, ios_base::in | ios_base::out); - VERIFY( fbout.is_open() ); + test &= bool( fbout.is_open() ); fbout.sputn("Whatever", 8); fbout.pubsync(); s1.signal(); @@ -79,7 +76,7 @@ bool test01() oss << &fbin; fbin.close(); - VERIFY( oss.str() == "Whatever" ); + test &= bool( oss.str() == "Whatever" ); return test; } diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/10097.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/10097.cc index 2d6e6db6e0e..6b149c5797c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/10097.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/10097.cc @@ -30,9 +30,6 @@ #include #include -// No asserts, avoid leaking the semaphores if a VERIFY fails. -#undef _GLIBCXX_ASSERT - #include class UnderBuf : public std::filebuf @@ -53,7 +50,7 @@ bool test16() { using namespace std; using namespace __gnu_test; - bool test __attribute__((unused)) = true; + bool test = true; const char* name = "tmp_fifo1"; @@ -62,7 +59,7 @@ bool test16() if (0 != mkfifo(name, S_IRWXU)) { - VERIFY( false ); + test = false; } semaphore s1, s2; @@ -70,13 +67,13 @@ bool test16() if (fval == -1) { unlink(name); - VERIFY( false ); + test = false; } else if (fval == 0) { filebuf fbout; fbout.open(name, ios_base::in|ios_base::out); - VERIFY( fbout.is_open() ); + test &= bool( fbout.is_open() ); fbout.sputn("0123456789", 10); fbout.pubsync(); s1.wait(); @@ -96,8 +93,8 @@ bool test16() --n; UnderBuf::int_type c = fb.pub_underflow(); - VERIFY( c != UnderBuf::traits_type::eof() ); - + test &= bool( c != UnderBuf::traits_type::eof() ); + fb.sbumpc(); } diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc index 131169458fa..72b978d97ce 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc @@ -26,10 +26,6 @@ using namespace std; -#ifndef _GLIBCXX_ASSERT -# define TEST_NUMPUT_VERBOSE 1 -#endif - struct _TestCase { double val; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc index a26fafa42d3..364bc56d2fa 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc @@ -27,10 +27,6 @@ #include #include -#ifndef _GLIBCXX_ASSERT -# define TEST_NUMPUT_VERBOSE 1 -#endif - #ifdef TEST_NUMPUT_VERBOSE # include #endif diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc index 449f2896be3..4c986532708 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc @@ -26,10 +26,6 @@ using namespace std; -#ifndef _GLIBCXX_ASSERT -# define TEST_NUMPUT_VERBOSE 1 -#endif - struct _TestCase { double val; diff --git a/libstdc++-v3/testsuite/27_io/objects/char/7.cc b/libstdc++-v3/testsuite/27_io/objects/char/7.cc index f9608daab77..f016c04df88 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/7.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/7.cc @@ -30,10 +30,6 @@ #include #include #include - -// No asserts, avoid leaking the semaphore if a VERIFY fails. -#undef _GLIBCXX_ASSERT - #include // Check that cout.flush() is called when last ios_base::Init is destroyed. @@ -41,7 +37,7 @@ bool test07() { using namespace std; using namespace __gnu_test; - bool test __attribute__((unused)) = true; + bool test = true; const char* name = "tmp_fifo4"; @@ -52,13 +48,13 @@ bool test07() semaphore s1; int child = fork(); - VERIFY( child != -1 ); + test &= bool( child != -1 ); if (child == 0) { filebuf fbout; fbout.open(name, ios_base::in|ios_base::out); - VERIFY( fbout.is_open() ); + test &= bool( fbout.is_open() ); s1.wait(); cout.rdbuf(&fbout); fbout.sputc('a'); @@ -70,8 +66,8 @@ bool test07() fbin.open(name, ios_base::in); s1.signal(); filebuf::int_type c = fbin.sbumpc(); - VERIFY( c != filebuf::traits_type::eof() ); - VERIFY( c == filebuf::traits_type::to_int_type('a') ); + test &= bool( c != filebuf::traits_type::eof() ); + test &= bool( c == filebuf::traits_type::to_int_type('a') ); fbin.close(); diff --git a/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc b/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc index e2d91bcb86b..12da7c9940c 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc @@ -20,9 +20,6 @@ // with this library; see the file COPYING3. If not see // . -// No asserts, avoid leaking the semaphores if a VERIFY fails. -#undef _GLIBCXX_ASSERT - #include #include #include @@ -41,7 +38,7 @@ bool test01() using namespace std; using namespace __gnu_test; - bool test __attribute__((unused)) = true; + bool test = true; const char* name = "tmp_fifo5"; @@ -52,12 +49,12 @@ bool test01() semaphore s1, s2; int child = fork(); - VERIFY( child != -1 ); + test &= bool( child != -1 ); if (child == 0) { FILE* file = fopen(name, "r+"); - VERIFY( file != 0 ); + test &= bool( file != 0 ); fputs("Whatever\n", file); fflush(file); s1.signal(); @@ -67,25 +64,25 @@ bool test01() exit(0); } - VERIFY( freopen(name, "r", stdin) ); + test &= bool( freopen(name, "r", stdin) ); s1.wait(); int c1 = fgetc(stdin); - VERIFY( c1 != EOF ); + test &= bool( c1 != EOF ); int c2 = cin.rdbuf()->sputbackc('a'); - VERIFY( c2 != EOF ); - VERIFY( c2 == 'a' ); + test &= bool( c2 != EOF ); + test &= bool( c2 == 'a' ); int c3 = fgetc(stdin); - VERIFY( c3 != EOF ); - VERIFY( c3 == c2 ); + test &= bool( c3 != EOF ); + test &= bool( c3 == c2 ); int c4 = ungetc('b', stdin); - VERIFY( c4 != EOF ); - VERIFY( c4 == 'b' ); + test &= bool( c4 != EOF ); + test &= bool( c4 == 'b' ); int c5 = cin.rdbuf()->sgetc(); - VERIFY( c5 != EOF ); - VERIFY( c5 == c4 ); + test &= bool( c5 != EOF ); + test &= bool( c5 == c4 ); s2.signal(); s1.wait(); diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/7.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/7.cc index f1954297d2f..3e63fe01144 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/7.cc @@ -31,9 +31,6 @@ #include #include -// No asserts, avoid leaking the semaphore if a VERIFY fails. -#undef _GLIBCXX_ASSERT - #include // Check that wcout.flush() is called when last ios_base::Init is destroyed. @@ -41,7 +38,7 @@ bool test07() { using namespace std; using namespace __gnu_test; - bool test __attribute__((unused)) = true; + bool test = true; const char* name = "tmp_fifo4"; @@ -52,7 +49,7 @@ bool test07() semaphore s1; int child = fork(); - VERIFY( child != -1 ); + test &= bool( child != -1 ); if (child == 0) { @@ -69,8 +66,8 @@ bool test07() fbin.open(name, ios_base::in); s1.signal(); wfilebuf::int_type c = fbin.sbumpc(); - VERIFY( c != wfilebuf::traits_type::eof() ); - VERIFY( c == wfilebuf::traits_type::to_int_type(L'a') ); + test &= bool( c != wfilebuf::traits_type::eof() ); + test &= bool( c == wfilebuf::traits_type::to_int_type(L'a') ); fbin.close(); diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc index 01da01acc51..b2e595706d5 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc @@ -20,9 +20,6 @@ // with this library; see the file COPYING3. If not see // . -// No asserts, avoid leaking the semaphores if a VERIFY fails. -#undef _GLIBCXX_ASSERT - #include #include #include @@ -41,7 +38,7 @@ bool test01() using namespace std; using namespace __gnu_test; - bool test __attribute__((unused)) = true; + bool test = true; const char* name = "tmp_fifo5"; @@ -52,7 +49,7 @@ bool test01() semaphore s1, s2; int child = fork(); - VERIFY( child != -1 ); + test &= bool( child != -1 ); if (child == 0) { @@ -66,25 +63,25 @@ bool test01() exit(0); } - VERIFY( freopen(name, "r", stdin) ); + test &= bool( freopen(name, "r", stdin) ); s1.wait(); wint_t c1 = fgetwc(stdin); - VERIFY( c1 != WEOF ); + test &= bool( c1 != WEOF ); wint_t c2 = wcin.rdbuf()->sputbackc(L'a'); - VERIFY( c2 != WEOF ); - VERIFY( c2 == L'a' ); + test &= bool( c2 != WEOF ); + test &= bool( c2 == L'a' ); wint_t c3 = fgetwc(stdin); - VERIFY( c3 != WEOF ); - VERIFY( c3 == c2 ); + test &= bool( c3 != WEOF ); + test &= bool( c3 == c2 ); wint_t c4 = ungetwc(L'b', stdin); - VERIFY( c4 != WEOF ); - VERIFY( c4 == L'b' ); + test &= bool( c4 != WEOF ); + test &= bool( c4 == L'b' ); wint_t c5 = wcin.rdbuf()->sgetc(); - VERIFY( c5 != WEOF ); - VERIFY( c5 == c4 ); + test &= bool( c5 != WEOF ); + test &= bool( c5 == c4 ); s2.signal(); s1.wait(); diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index 1780eaff5c1..bdb80a06a36 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -236,7 +236,7 @@ proc libstdc++_init { testfile } { # Default settings. set cxx [transform "g++"] - set cxxflags "-D_GLIBCXX_ASSERT -fmessage-length=0" + set cxxflags "-fmessage-length=0" set cxxpchflags "" set cxxvtvflags "" set cxxldflags "" diff --git a/libstdc++-v3/testsuite/util/testsuite_hooks.h b/libstdc++-v3/testsuite/util/testsuite_hooks.h index c6f020c34db..e4c4866eba4 100644 --- a/libstdc++-v3/testsuite/util/testsuite_hooks.h +++ b/libstdc++-v3/testsuite/util/testsuite_hooks.h @@ -21,10 +21,7 @@ // This file provides the following: // -// 1) VERIFY(), via _GLIBCXX_ASSERT, from Brent Verner . -// This file is included in the various testsuite programs to provide -// #define(able) assert() behavior for debugging/testing. It may be -// a suitable location for other furry woodland creatures as well. +// 1) VERIFY() // // 2) set_memory_limits() // set_memory_limits() uses setrlimit() to restrict dynamic memory @@ -54,12 +51,16 @@ #include #endif -#ifdef _GLIBCXX_ASSERT -# include -# define VERIFY(fn) assert(fn) -#else -# define VERIFY(fn) test &= bool(fn) -#endif +#define VERIFY(fn) \ + do \ + { \ + if (! (fn)) \ + { \ + __builtin_printf("%s:%d: %s: Assertion '%s' failed.\n", \ + __FILE__, __LINE__, __PRETTY_FUNCTION__, #fn); \ + __builtin_abort(); \ + } \ + } while (false) #ifdef _GLIBCXX_HAVE_UNISTD_H # include