This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Paolo Carlini wrote:
> Paolo Carlini wrote:
>
>
>> Hi Chris,
>>
>> and thanks!
>>
>>
>>> attach to this mail my current patch.
>>>
>>>
>> Maybe ;)
>>
>>
>>
> Is it clear that in fact the patch never showed up?!?
>
>
Sorry, I decided to clean up the patch some more, and got carried away.
Anyway, here is the current version, attached really this time, with
Changelog. Obviously at this point I'm not expecting any replies on this
until after the new year ;)
It looks very long and nasty, but really almost all of it is fairly
mechanical. The only remaining failures if you give add
"-Wall -Wextra -Wsystem-headers -Wno-missing-field-initializers
-Wno-missing-braces" to scripts/testsuite_flags.in (if you try this
yourself, not that scripts/testsuite_flags doesn't automatically get
rebuilt, you have to delete it to force it to be remade).
Are:
FAIL: 17_intro/no_assert_neg.cc (test for excess errors)
Excess errors:
In file included from
/Users/caj/gccdev/trunkobj/powerpc-apple-darwin8.3.0/libstdc++-v3
/include/bits/stl_algobase.h:64,
from
/Users/caj/gccdev/trunkobj/powerpc-apple-darwin8.3.0/libstdc++-v3
/include/algorithm:65,
from
/Users/caj/gccdev/trunk/libstdc++-v3/testsuite/17_intro/no_assert
_neg.cc:32:
/Users/caj/gccdev/trunkobj/powerpc-apple-darwin8.3.0/libstdc++-v3/include/powerpc-apple
-darwin8.3.0/bits/c++config.h:106:1: warning: "__GLIBCXX__" redefined
<command line>:1:1: warning: this is the location of the previous definition
I just can't figure out the flag that would turn this one off (it would
have to be added to this test case)
FAIL: ext/pb_assoc/example/mapping_level.cc
(I don't know what this code is.. the error is about dereferencing a
type-pruned pointer.. anyone want to admit to being in charge of this code?)
Attachment:
ChangeLog-testsuite
Description: application/text
Index: include/ext/mt_allocator.h
===================================================================
--- include/ext/mt_allocator.h (revision 108948)
+++ include/ext/mt_allocator.h (working copy)
@@ -631,7 +631,7 @@
__mt_alloc(const __mt_alloc&) throw() { }
template<typename _Tp1, typename _Poolp1>
- __mt_alloc(const __mt_alloc<_Tp1, _Poolp1>& obj) throw() { }
+ __mt_alloc(const __mt_alloc<_Tp1, _Poolp1>&) throw() { }
~__mt_alloc() throw() { }
Index: include/bits/stream_iterator.h
===================================================================
--- include/bits/stream_iterator.h (revision 108948)
+++ include/bits/stream_iterator.h (working copy)
@@ -60,7 +60,7 @@
public:
/// Construct end of input stream iterator.
istream_iterator()
- : _M_stream(0), _M_ok(false) {}
+ : _M_stream(0), _M_value(), _M_ok(false) {}
/// Construct start of input stream iterator.
istream_iterator(istream_type& __s)
Index: include/debug/functions.h
===================================================================
--- include/debug/functions.h (revision 108948)
+++ include/debug/functions.h (working copy)
@@ -154,7 +154,8 @@
template<typename _InputIterator>
inline _InputIterator
__check_valid_range(const _InputIterator& __first,
- const _InputIterator& __last)
+ const _InputIterator& __last
+ __attribute__((__unused__)))
{
_GLIBCXX_DEBUG_ASSERT(__valid_range(__first, __last));
return __first;
@@ -163,7 +164,8 @@
/** Checks that __s is non-NULL or __n == 0, and then returns __s. */
template<typename _CharT, typename _Integer>
inline const _CharT*
- __check_string(const _CharT* __s, const _Integer& __n)
+ __check_string(const _CharT* __s,
+ const _Integer& __n __attribute__((__unused__)))
{
#ifdef _GLIBCXX_DEBUG_PEDANTIC
_GLIBCXX_DEBUG_ASSERT(__s != 0 || __n == 0);
Index: include/tr1/hashtable
===================================================================
--- include/tr1/hashtable (revision 108948)
+++ include/tr1/hashtable (working copy)
@@ -1103,7 +1103,7 @@
{ return local_iterator(m_buckets[n]); }
local_iterator
- end(size_type n)
+ end(size_type)
{ return local_iterator(0); }
const_local_iterator
@@ -1111,7 +1111,7 @@
{ return const_local_iterator(m_buckets[n]); }
const_local_iterator
- end(size_type n) const
+ end(size_type) const
{ return const_local_iterator(0); }
float
Index: include/tr1/tuple_iterate.h
===================================================================
--- include/tr1/tuple_iterate.h (revision 108948)
+++ include/tr1/tuple_iterate.h (working copy)
@@ -93,13 +93,13 @@
#else
- tuple(const tuple& __in)
+ tuple(const tuple&)
{ }
#endif
tuple&
- operator=(const tuple& __in)
+ operator=(const tuple& __in __attribute__((__unused__)) )
{
_GLIBCXX_TUPLE_ASSIGN
return *this;
Index: include/tr1/functional
===================================================================
--- include/tr1/functional (revision 108948)
+++ include/tr1/functional (working copy)
@@ -1156,7 +1156,7 @@
static std::size_t
hash(const char* first, std::size_t length)
{
- std::size_t result = 2166136261UL;
+ std::size_t result = static_cast<std::size_t>(2166136261UL);
for (; length > 0; --length)
{
result ^= (std::size_t)*first++;
@@ -1172,7 +1172,7 @@
static std::size_t
hash(const char* first, std::size_t length)
{
- std::size_t result = 14695981039346656037ULL;
+ std::size_t result = static_cast<std::size_t>(14695981039346656037ULL);
for (; length > 0; --length)
{
result ^= (std::size_t)*first++;
Index: include/std/std_bitset.h
===================================================================
--- include/std/std_bitset.h (revision 108948)
+++ include/std/std_bitset.h (working copy)
@@ -1290,6 +1290,52 @@
__x._M_copy_to_string(__tmp);
return __os << __tmp;
}
+
+ // Specializations for zero-sized bitsets, to avoid "unsigned comparison
+ // with zero" warnings.
+ template<>
+ template<class _CharT, class _Traits, class _Alloc>
+ void
+ bitset<0>::_M_copy_to_string(std::basic_string<_CharT, _Traits,
+ _Alloc>& __s) const
+ { __s.assign(0, '0'); }
+
+ template<class _CharT, class _Traits>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<0>&)
+ { return __is; }
+
+ template<>
+ bitset<0>&
+ bitset<0>::set(size_t, bool)
+ {
+ __throw_out_of_range(__N("bitset::set"));
+ return *this;
+ }
+
+ template<>
+ bitset<0>&
+ bitset<0>::reset(size_t)
+ {
+ __throw_out_of_range(__N("bitset::reset"));
+ return *this;
+ }
+
+ template<>
+ bitset<0>&
+ bitset<0>::flip(size_t)
+ {
+ __throw_out_of_range(__N("bitset::flip"));
+ return *this;
+ }
+
+ template<>
+ bool
+ bitset<0>::test(size_t) const
+ {
+ __throw_out_of_range(__N("bitset::test"));
+ return false;
+ }
//@}
_GLIBCXX_END_NESTED_NAMESPACE
Index: scripts/testsuite_flags.in
===================================================================
--- scripts/testsuite_flags.in (revision 108948)
+++ scripts/testsuite_flags.in (working copy)
@@ -47,7 +47,9 @@
echo ${CXX}
;;
--cxxflags)
- CXXFLAGS_save="-g -O2 -D_GLIBCXX_ASSERT"
+ CXXFLAGS_save="-g -O2 -D_GLIBCXX_ASSERT -Wextra -Wall
+ -Wno-missing-field-initializers -Wno-missing-braces
+ -Wsystem-headers"
CXXFLAGS_config='@SECTION_FLAGS@ @SECTION_LDFLAGS@ -fmessage-length=0
@EXTRA_CXX_FLAGS@ -DLOCALEDIR="@glibcxx_localedir@" '
echo ${CXXFLAGS_save} ${CXXFLAGS_config}
Index: testsuite/25_algorithms/iter_swap/20577.cc
===================================================================
--- testsuite/25_algorithms/iter_swap/20577.cc (revision 108948)
+++ testsuite/25_algorithms/iter_swap/20577.cc (working copy)
@@ -47,7 +47,7 @@
int int_swap_count;
struct X {};
-void swap(X& i, X& j)
+void swap(X&, X&)
{ ++int_swap_count; }
void
Index: testsuite/25_algorithms/unique_copy/check_type.cc
===================================================================
--- testsuite/25_algorithms/unique_copy/check_type.cc (revision 108948)
+++ testsuite/25_algorithms/unique_copy/check_type.cc (working copy)
@@ -30,7 +30,7 @@
struct S2
{
- S2(const S1& s1) {}
+ S2(const S1&) {}
};
bool
@@ -40,7 +40,7 @@
struct X2
{
- X2(const X1& x1) {}
+ X2(const X1&) {}
};
bool
Index: testsuite/25_algorithms/replace_copy/check_type.cc
===================================================================
--- testsuite/25_algorithms/replace_copy/check_type.cc (revision 108948)
+++ testsuite/25_algorithms/replace_copy/check_type.cc (working copy)
@@ -34,11 +34,11 @@
{
Z&
operator=(const X&)
- { }
+ { return *this; }
Z&
operator=(const Y&)
- { }
+ { return *this; }
};
bool
Index: testsuite/25_algorithms/find/17441.cc
===================================================================
--- testsuite/25_algorithms/find/17441.cc (revision 108948)
+++ testsuite/25_algorithms/find/17441.cc (working copy)
@@ -24,8 +24,8 @@
template<typename InputIterator, typename Tp>
InputIterator
- find(InputIterator first, InputIterator last,
- const Tp& val, input_iterator_tag)
+ find(InputIterator first, InputIterator,
+ const Tp&, input_iterator_tag)
{ return first; }
// libstdc++/17441
Index: testsuite/25_algorithms/replace_copy_if/check_type.cc
===================================================================
--- testsuite/25_algorithms/replace_copy_if/check_type.cc (revision 108948)
+++ testsuite/25_algorithms/replace_copy_if/check_type.cc (working copy)
@@ -34,11 +34,11 @@
{
Z&
operator=(const X&)
- { }
+ { return *this; }
Z&
operator=(const Y&)
- { }
+ { return *this; }
};
bool
Index: testsuite/25_algorithms/heap/heap.cc
===================================================================
--- testsuite/25_algorithms/heap/heap.cc (revision 108948)
+++ testsuite/25_algorithms/heap/heap.cc (working copy)
@@ -87,7 +87,7 @@
{
Gt gt;
// const int logN = static_cast<int>(std::log(static_cast<double>(N)) + 0.5);
- const int logN = 3;
+ const int logN __attribute__((unused)) = 3;
int s1[N];
std::copy(A, A + N, s1);
Index: testsuite/18_support/numeric_limits/specialization.cc
===================================================================
--- testsuite/18_support/numeric_limits/specialization.cc (revision 108948)
+++ testsuite/18_support/numeric_limits/specialization.cc (working copy)
@@ -41,7 +41,7 @@
struct B
{
- B(int i = 0) { }
+ B(int i __attribute__((unused)) = 0) { }
};
Index: testsuite/18_support/numeric_limits/traps.cc
===================================================================
--- testsuite/18_support/numeric_limits/traps.cc (revision 108948)
+++ testsuite/18_support/numeric_limits/traps.cc (working copy)
@@ -33,7 +33,7 @@
volatile value_type j(0);
if (!std::numeric_limits<value_type>::traps)
- value_type r = i/j;
+ value_type r __attribute__((unused)) = i/j;
}
// libstdc++/22203
Index: testsuite/ext/malloc_allocator/deallocate_global.cc
===================================================================
--- testsuite/ext/malloc_allocator/deallocate_global.cc (revision 108948)
+++ testsuite/ext/malloc_allocator/deallocate_global.cc (working copy)
@@ -57,7 +57,8 @@
if (count == 0)
printf("All memory released \n");
else
- printf("%u allocations to be released \n", count);
+ printf("%u allocations to be released \n",
+ static_cast<unsigned int>(count));
free(p);
}
Index: testsuite/ext/malloc_allocator/deallocate_local.cc
===================================================================
--- testsuite/ext/malloc_allocator/deallocate_local.cc (revision 108948)
+++ testsuite/ext/malloc_allocator/deallocate_local.cc (working copy)
@@ -44,7 +44,8 @@
if (alloc_cnt == 0)
printf("All memory released \n");
else
- printf("%u allocations to be released \n", alloc_cnt);
+ printf("%u allocations to be released \n",
+ static_cast<unsigned int>(alloc_cnt));
free(p);
}
Index: testsuite/ext/pool_allocator/allocate_chunk.cc
===================================================================
--- testsuite/ext/pool_allocator/allocate_chunk.cc (revision 108948)
+++ testsuite/ext/pool_allocator/allocate_chunk.cc (working copy)
@@ -53,7 +53,7 @@
// The constant 20 comes from __pool_alloc_base::_M_refill. See
// also __pool_alloc_base::_M_allocate_chunk.
__pool_alloc<small> alloc_small;
- for (int i = 0; i < 20 * sizeof(big) / sizeof(small) + 1; ++i)
+ for (unsigned int i = 0; i < 20 * sizeof(big) / sizeof(small) + 1; ++i)
alloc_small.allocate(1);
}
Index: testsuite/ext/array_allocator/2.cc
===================================================================
--- testsuite/ext/array_allocator/2.cc (revision 108948)
+++ testsuite/ext/array_allocator/2.cc (working copy)
@@ -47,7 +47,7 @@
typedef __gnu_cxx::array_allocator<char_type, array_type> allocator_type;
typedef basic_string<char_type, traits_type, allocator_type> string_type;
- size_t index = array_type::_S_index;
+ size_t index __attribute__((unused)) = array_type::_S_index;
allocator_type a(&extern_array);
string_type s(a);
Index: testsuite/22_locale/ctype/narrow/char/19955.cc
===================================================================
--- testsuite/22_locale/ctype/narrow/char/19955.cc (revision 108948)
+++ testsuite/22_locale/ctype/narrow/char/19955.cc (working copy)
@@ -36,7 +36,7 @@
protected:
const char*
do_narrow(const char* lo, const char* hi,
- char dflt, char* to) const
+ char, char* to) const
{
for (int i = 0; lo != hi; ++lo, ++to, ++i)
*to = *lo + i;
Index: testsuite/22_locale/ctype/is/char/9858.cc
===================================================================
--- testsuite/22_locale/ctype/is/char/9858.cc (revision 108948)
+++ testsuite/22_locale/ctype/is/char/9858.cc (working copy)
@@ -39,15 +39,15 @@
do_is(mask, char_type) const { return true; }
const char_type*
- do_is(const char_type* lo, const char_type* hi, mask* vec) const
+ do_is(const char_type*, const char_type* hi, mask*) const
{ return hi; }
const char_type*
- do_scan_is(mask m, const char_type* lo, const char_type* hi) const
+ do_scan_is(mask, const char_type*, const char_type* hi) const
{ return hi; }
const char_type*
- do_scan_not(mask m, const char_type* lo, const char_type* hi) const
+ do_scan_not(mask, const char_type*, const char_type* hi) const
{ return hi; }
};
@@ -58,15 +58,15 @@
do_is(mask, char_type) const { called = 1; return true; }
const char_type*
- do_is(const char_type* lo, const char_type* hi, mask* vec) const
+ do_is(const char_type*, const char_type* hi, mask*) const
{ called = 5; return hi; }
const char_type*
- do_scan_is(mask m, const char_type* lo, const char_type* hi) const
+ do_scan_is(mask, const char_type*, const char_type* hi) const
{ called = 10; return hi; }
const char_type*
- do_scan_not(mask m, const char_type* lo, const char_type* hi) const
+ do_scan_not(mask, const char_type*, const char_type* hi) const
{ called = 15; return hi; }
};
Index: testsuite/22_locale/time_put/put/wchar_t/12439_1.cc
===================================================================
--- testsuite/22_locale/time_put/put/wchar_t/12439_1.cc (revision 108948)
+++ testsuite/22_locale/time_put/put/wchar_t/12439_1.cc (working copy)
@@ -31,7 +31,7 @@
protected:
iter_type do_put(iter_type s, std::ios_base&, char_type fill,
- const std::tm* t, char format, char modifier) const
+ const std::tm*, char, char) const
{
fill_chars.push_back(fill);
return s;
Index: testsuite/22_locale/time_put/put/wchar_t/12439_3.cc
===================================================================
--- testsuite/22_locale/time_put/put/wchar_t/12439_3.cc (revision 108948)
+++ testsuite/22_locale/time_put/put/wchar_t/12439_3.cc (working copy)
@@ -29,8 +29,8 @@
mutable std::string format_chars;
protected:
- iter_type do_put(iter_type s, std::ios_base&, char_type fill,
- const std::tm* t, char format, char modifier) const
+ iter_type do_put(iter_type s, std::ios_base&, char_type,
+ const std::tm*, char format, char) const
{
format_chars.push_back(format);
return s;
Index: testsuite/22_locale/time_put/put/char/12439_1.cc
===================================================================
--- testsuite/22_locale/time_put/put/char/12439_1.cc (revision 108948)
+++ testsuite/22_locale/time_put/put/char/12439_1.cc (working copy)
@@ -31,7 +31,7 @@
protected:
iter_type do_put(iter_type s, std::ios_base&, char_type fill,
- const std::tm* t, char format, char modifier) const
+ const std::tm*, char, char) const
{
fill_chars.push_back(fill);
return s;
Index: testsuite/22_locale/time_put/put/char/12439_3.cc
===================================================================
--- testsuite/22_locale/time_put/put/char/12439_3.cc (revision 108948)
+++ testsuite/22_locale/time_put/put/char/12439_3.cc (working copy)
@@ -29,8 +29,8 @@
mutable std::string format_chars;
protected:
- iter_type do_put(iter_type s, std::ios_base&, char_type fill,
- const std::tm* t, char format, char modifier) const
+ iter_type do_put(iter_type s, std::ios_base&, char_type,
+ const std::tm*, char format, char) const
{
format_chars.push_back(format);
return s;
Index: testsuite/testsuite_io.h
===================================================================
--- testsuite/testsuite_io.h (revision 108948)
+++ testsuite/testsuite_io.h (working copy)
@@ -214,7 +214,7 @@
protected:
iter_type
- do_get(iter_type a, iter_type, ios_base&, ios_base::iostate&, bool&) const
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const
{ throw facet_error(); return iter_type(); }
virtual iter_type
@@ -222,49 +222,49 @@
{ throw facet_error(); return iter_type(); }
virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate&,
unsigned short&) const
{ throw facet_error(); return iter_type(); }
virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate&,
unsigned int&) const
{ throw facet_error(); return iter_type(); }
virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate&,
unsigned long&) const
{ throw facet_error(); return iter_type(); }
#ifdef _GLIBCXX_USE_LONG_LONG
virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate&,
long long&) const
{ throw facet_error(); return iter_type(); }
virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate&,
unsigned long long&) const
{ throw facet_error(); return iter_type(); }
#endif
virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate&,
float&) const
{ throw facet_error(); return iter_type(); }
virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate&,
double&) const
{ throw facet_error(); return iter_type(); }
virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate&,
long double&) const
{ throw facet_error(); return iter_type(); }
virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate&,
void*&) const
{ throw facet_error(); return iter_type(); }
};
@@ -284,37 +284,37 @@
protected:
iter_type
- do_put(iter_type, ios_base&, char_type __fill, bool __v) const
+ do_put(iter_type, ios_base&, char_type, bool) const
{ throw facet_error(); return iter_type(NULL); }
virtual iter_type
- do_put(iter_type, ios_base&, char_type __fill, long __v) const
+ do_put(iter_type, ios_base&, char_type, long) const
{ throw facet_error(); return iter_type(NULL); }
virtual iter_type
- do_put(iter_type, ios_base&, char_type __fill, unsigned long) const
+ do_put(iter_type, ios_base&, char_type, unsigned long) const
{ throw facet_error(); return iter_type(NULL); }
#ifdef _GLIBCXX_USE_LONG_LONG
virtual iter_type
- do_put(iter_type, ios_base&, char_type __fill, long long __v) const
+ do_put(iter_type, ios_base&, char_type, long long) const
{ throw facet_error(); return iter_type(NULL); }
virtual iter_type
- do_put(iter_type, ios_base&, char_type __fill, unsigned long long) const
+ do_put(iter_type, ios_base&, char_type, unsigned long long) const
{ throw facet_error(); return iter_type(NULL); }
#endif
virtual iter_type
- do_put(iter_type, ios_base&, char_type __fill, double __v) const
+ do_put(iter_type, ios_base&, char_type, double) const
{ throw facet_error(); return iter_type(NULL); }
virtual iter_type
- do_put(iter_type, ios_base&, char_type __fill, long double __v) const
+ do_put(iter_type, ios_base&, char_type, long double) const
{ throw facet_error(); return iter_type(NULL); }
virtual iter_type
- do_put(iter_type, ios_base&, char_type __fill, const void* __v) const
+ do_put(iter_type, ios_base&, char_type, const void*) const
{ throw facet_error(); return iter_type(NULL); }
};
Index: testsuite/tr1/3_function_objects/mem_fn.cc
===================================================================
--- testsuite/tr1/3_function_objects/mem_fn.cc (revision 108948)
+++ testsuite/tr1/3_function_objects/mem_fn.cc (working copy)
@@ -56,19 +56,19 @@
const dumb_ptr<X>& xdc = xd;
const dumb_ptr<Y>& ydc = yd;
- int& bx = mem_fn(&X::bar)(x);
- const int& bxc = mem_fn(&X::bar)(xc);
- int& bxp = mem_fn(&X::bar)(xp);
- const int& bxpc = mem_fn(&X::bar)(xpc);
- const int& bxd = mem_fn(&X::bar)(xd);
- const int& bxdc = mem_fn(&X::bar)(xdc);
+ int& bx __attribute__((unused)) = mem_fn(&X::bar)(x);
+ const int& bxc __attribute__((unused)) = mem_fn(&X::bar)(xc);
+ int& bxp __attribute__((unused)) = mem_fn(&X::bar)(xp);
+ const int& bxpc __attribute__((unused)) = mem_fn(&X::bar)(xpc);
+ const int& bxd __attribute__((unused)) = mem_fn(&X::bar)(xd);
+ const int& bxdc __attribute__((unused)) = mem_fn(&X::bar)(xdc);
- int& by = mem_fn(&X::bar)(y);
- const int& byc = mem_fn(&X::bar)(yc);
- int& byp = mem_fn(&X::bar)(yp);
- const int& bypc = mem_fn(&X::bar)(ypc);
- const int& byd = mem_fn(&X::bar)(yd);
- const int& bydc = mem_fn(&X::bar)(ydc);
+ int& by __attribute__((unused)) = mem_fn(&X::bar)(y);
+ const int& byc __attribute__((unused)) = mem_fn(&X::bar)(yc);
+ int& byp __attribute__((unused)) = mem_fn(&X::bar)(yp);
+ const int& bypc __attribute__((unused)) = mem_fn(&X::bar)(ypc);
+ const int& byd __attribute__((unused)) = mem_fn(&X::bar)(yd);
+ const int& bydc __attribute__((unused)) = mem_fn(&X::bar)(ydc);
}
int main()
Index: testsuite/tr1/2_general_utilities/memory/shared_ptr/assign/shared_ptr.cc
===================================================================
--- testsuite/tr1/2_general_utilities/memory/shared_ptr/assign/shared_ptr.cc (revision 108948)
+++ testsuite/tr1/2_general_utilities/memory/shared_ptr/assign/shared_ptr.cc (working copy)
@@ -57,7 +57,7 @@
// 2.2.3.3 shared_ptr assignment [tr.util.smartptr.shared.assign]
// Assignment from shared_ptr<Y>
-int
+void
test01()
{
reset_count_struct __attribute__((unused)) reset;
Index: testsuite/tr1/2_general_utilities/memory/shared_ptr/assign/assign.cc
===================================================================
--- testsuite/tr1/2_general_utilities/memory/shared_ptr/assign/assign.cc (revision 108948)
+++ testsuite/tr1/2_general_utilities/memory/shared_ptr/assign/assign.cc (working copy)
@@ -44,7 +44,7 @@
// 2.2.3.3 shared_ptr assignment [tr.util.smartptr.shared.assign]
// Assignment from shared_ptr<Y>
-int
+void
test01()
{
reset_count_struct __attribute__((unused)) reset;
Index: testsuite/tr1/6_containers/unordered/instantiate/hash.cc
===================================================================
--- testsuite/tr1/6_containers/unordered/instantiate/hash.cc (revision 108948)
+++ testsuite/tr1/6_containers/unordered/instantiate/hash.cc (working copy)
@@ -31,24 +31,24 @@
// Verify that we can instantiate hash for every required type.
- hash<bool> hb;
- hash<char> hc;
- hash<signed char> hsc;
- hash<unsigned char> huc;
- hash<short> hs;
- hash<int> hi;
- hash<long> hl;
- hash<unsigned short> hus;
- hash<unsigned int> hui;
- hash<unsigned long> hul;
- hash<float> hf;
- hash<double> hd;
- hash<long double> hld;
- hash<void*> hp;
- hash<std::string> hstr;
+ hash<bool> hb __attribute__((unused));
+ hash<char> hc __attribute__((unused));
+ hash<signed char> hsc __attribute__((unused));
+ hash<unsigned char> huc __attribute__((unused));
+ hash<short> hs __attribute__((unused));
+ hash<int> hi __attribute__((unused));
+ hash<long> hl __attribute__((unused));
+ hash<unsigned short> hus __attribute__((unused));
+ hash<unsigned int> hui __attribute__((unused));
+ hash<unsigned long> hul __attribute__((unused));
+ hash<float> hf __attribute__((unused));
+ hash<double> hd __attribute__((unused));
+ hash<long double> hld __attribute__((unused));
+ hash<void*> hp __attribute__((unused));
+ hash<std::string> hstr __attribute__((unused));
#ifdef _GLIBCXX_USE_WCHAR_T
- hash<wchar_t> hw;
- hash<std::wstring> hwstr;
+ hash<wchar_t> hw __attribute__((unused));
+ hash<std::wstring> hwstr __attribute__((unused));
#endif
}
Index: testsuite/tr1/6_containers/unordered/insert/multiset_range.cc
===================================================================
--- testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (revision 108948)
+++ testsuite/tr1/6_containers/unordered/insert/multiset_range.cc (working copy)
@@ -42,7 +42,7 @@
"magenta", "yellow", "orange", "pink", "gray" };
s.insert(A+0, A+N);
- VERIFY(s.size() == N);
+ VERIFY(s.size() == static_cast<unsigned int>(N));
VERIFY(std::distance(s.begin(), s.end()) == N);
for (int i = 0; i < N; ++i) {
@@ -62,7 +62,7 @@
const int A[N] = { 3, 7, 4, 8, 2, 4, 6, 7 };
s.insert(A+0, A+N);
- VERIFY(s.size() == N);
+ VERIFY(s.size() == static_cast<unsigned int>(N));
VERIFY(std::distance(s.begin(), s.end()) == N);
VERIFY(std::count(s.begin(), s.end(), 2) == 1);
Index: testsuite/tr1/6_containers/unordered/insert/set_range.cc
===================================================================
--- testsuite/tr1/6_containers/unordered/insert/set_range.cc (revision 108948)
+++ testsuite/tr1/6_containers/unordered/insert/set_range.cc (working copy)
@@ -42,7 +42,7 @@
"magenta", "yellow", "orange", "pink", "gray" };
s.insert(A+0, A+N);
- VERIFY(s.size() == N);
+ VERIFY(s.size() == static_cast<unsigned int>(N));
VERIFY(std::distance(s.begin(), s.end()) == N);
for (int i = 0; i < N; ++i) {
@@ -62,7 +62,7 @@
const int A[N] = { 3, 7, 4, 8, 2, 4, 6, 7 };
s.insert(A+0, A+N);
- VERIFY(s.size() == 6);
+ VERIFY(s.size() == static_cast<unsigned int>(6));
VERIFY(std::distance(s.begin(), s.end()) == 6);
VERIFY(std::count(s.begin(), s.end(), 2) == 1);
Index: testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc
===================================================================
--- testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc (revision 108948)
+++ testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc (working copy)
@@ -29,8 +29,8 @@
{
typedef std::tr1::array<int, 5> array_type;
- array_type a = { 0, 1, 2, 3, 4 };
- array_type b = { 0, 1, 2, 3 };
+ array_type a __attribute__((unused)) = { 0, 1, 2, 3, 4 };
+ array_type b __attribute__((unused)) = { 0, 1, 2, 3 };
}
int main()
Index: testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc
===================================================================
--- testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc (revision 108948)
+++ testsuite/tr1/6_containers/array/requirements/zero_sized_arrays.cc (working copy)
@@ -31,7 +31,7 @@
bool test __attribute__((unused)) = true;
// 1: ?
- array_type a = { };
+ array_type a __attribute__((unused)) = { };
// 2
array_type b;
Index: testsuite/tr1/4_metaprogramming/type_properties/is_empty/is_empty.cc
===================================================================
--- testsuite/tr1/4_metaprogramming/type_properties/is_empty/is_empty.cc (revision 108948)
+++ testsuite/tr1/4_metaprogramming/type_properties/is_empty/is_empty.cc (working copy)
@@ -20,6 +20,11 @@
// 4.5.3 Type properties
+// This warning is triggered because of NonEmptyClassTwo, but we need to test
+// if is_empty works correctly on this kind of type.
+
+/* { dg-options "-Wno-non-virtual-dtor" } */
+
#include <tr1/type_traits>
#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
@@ -42,6 +47,9 @@
virtual ~NonEmptyClassTwo();
};
+class NonEmptyClassThree
+{ virtual ~NonEmptyClassThree(); };
+
void test01()
{
bool test __attribute__((unused)) = true;
@@ -67,6 +75,7 @@
VERIFY( (test_category<is_empty, AbstractClass>(false)) );
VERIFY( (test_category<is_empty, NonEmptyClassOne>(false)) );
VERIFY( (test_category<is_empty, NonEmptyClassTwo>(false)) );
+ VERIFY( (test_category<is_empty, NonEmptyClassThree>(false)) );
}
int main()
Index: testsuite/thread/18185.cc
===================================================================
--- testsuite/thread/18185.cc (revision 108948)
+++ testsuite/thread/18185.cc (working copy)
@@ -26,7 +26,7 @@
#include <pthread.h>
static void *
-foo (void *p)
+foo (void *)
{
typedef std::char_traits<char> traits_type;
typedef __gnu_cxx::new_allocator<char> allocator_type;
@@ -47,7 +47,7 @@
main ()
{
pthread_t t;
- int j = pthread_create (&t, 0, foo, 0);
- int i = pthread_join (t, 0);
+ int j __attribute__((unused)) = pthread_create (&t, 0, foo, 0);
+ int i __attribute__((unused)) = pthread_join (t, 0);
return 0;
}
Index: testsuite/23_containers/vector/modifiers/erase/1.cc
===================================================================
--- testsuite/23_containers/vector/modifiers/erase/1.cc (revision 108948)
+++ testsuite/23_containers/vector/modifiers/erase/1.cc (working copy)
@@ -29,12 +29,12 @@
const int A3[] = {0, 2, 3, 4, 10, 11};
const int A4[] = {4, 10, 11};
const int A5[] = {4, 10};
-const int N = sizeof(A) / sizeof(int);
-const int N1 = sizeof(A1) / sizeof(int);
-const int N2 = sizeof(A2) / sizeof(int);
-const int N3 = sizeof(A3) / sizeof(int);
-const int N4 = sizeof(A4) / sizeof(int);
-const int N5 = sizeof(A5) / sizeof(int);
+const unsigned int N = sizeof(A) / sizeof(int);
+const unsigned int N1 = sizeof(A1) / sizeof(int);
+const unsigned int N2 = sizeof(A2) / sizeof(int);
+const unsigned int N3 = sizeof(A3) / sizeof(int);
+const unsigned int N4 = sizeof(A4) / sizeof(int);
+const unsigned int N5 = sizeof(A5) / sizeof(int);
void
test01()
@@ -85,17 +85,17 @@
typedef vec_type::iterator iterator_type;
vec_type v, v1, v2, v3, v4, v5;
- for (int i = 0; i < N; ++i)
+ for (unsigned int i = 0; i < N; ++i)
v.push_back(std::vector<int>(1, A[i]));
- for (int i = 0; i < N1; ++i)
+ for (unsigned int i = 0; i < N1; ++i)
v1.push_back(std::vector<int>(1, A1[i]));
- for (int i = 0; i < N2; ++i)
+ for (unsigned int i = 0; i < N2; ++i)
v2.push_back(std::vector<int>(1, A2[i]));
- for (int i = 0; i < N3; ++i)
+ for (unsigned int i = 0; i < N3; ++i)
v3.push_back(std::vector<int>(1, A3[i]));
- for (int i = 0; i < N4; ++i)
+ for (unsigned int i = 0; i < N4; ++i)
v4.push_back(std::vector<int>(1, A4[i]));
- for (int i = 0; i < N5; ++i)
+ for (unsigned int i = 0; i < N5; ++i)
v5.push_back(std::vector<int>(1, A5[i]));
iterator_type it1 = v.erase(v.begin() + 1);
Index: testsuite/23_containers/vector/cons/clear_allocator.cc
===================================================================
--- testsuite/23_containers/vector/cons/clear_allocator.cc (revision 108948)
+++ testsuite/23_containers/vector/cons/clear_allocator.cc (working copy)
@@ -37,11 +37,11 @@
clear_alloc() throw()
{ }
- clear_alloc(clear_alloc const& _wa) throw()
+ clear_alloc(clear_alloc const&) throw() : new_allocator<T>()
{ }
template<typename T1>
- clear_alloc(clear_alloc<T1> const& _wa) throw()
+ clear_alloc(clear_alloc<T1> const&) throw()
{ }
virtual ~clear_alloc() throw()
Index: testsuite/23_containers/vector/bool/clear_allocator.cc
===================================================================
--- testsuite/23_containers/vector/bool/clear_allocator.cc (revision 108948)
+++ testsuite/23_containers/vector/bool/clear_allocator.cc (working copy)
@@ -37,11 +37,11 @@
clear_alloc() throw()
{ }
- clear_alloc(clear_alloc const& _wa) throw()
+ clear_alloc(clear_alloc const&) throw() : new_allocator<T>()
{ }
template<typename T1>
- clear_alloc(clear_alloc<T1> const& _wa) throw()
+ clear_alloc(clear_alloc<T1> const&) throw()
{ }
virtual ~clear_alloc() throw()
Index: testsuite/23_containers/deque/cons/clear_allocator.cc
===================================================================
--- testsuite/23_containers/deque/cons/clear_allocator.cc (revision 108948)
+++ testsuite/23_containers/deque/cons/clear_allocator.cc (working copy)
@@ -37,11 +37,11 @@
clear_alloc() throw()
{ }
- clear_alloc(clear_alloc const& _wa) throw()
+ clear_alloc(clear_alloc const&) throw() : new_allocator<T>()
{ }
template<typename T1>
- clear_alloc(clear_alloc<T1> const& _wa) throw()
+ clear_alloc(clear_alloc<T1> const&) throw()
{ }
virtual ~clear_alloc() throw()
Index: testsuite/23_containers/list/cons/clear_allocator.cc
===================================================================
--- testsuite/23_containers/list/cons/clear_allocator.cc (revision 108948)
+++ testsuite/23_containers/list/cons/clear_allocator.cc (working copy)
@@ -37,11 +37,11 @@
clear_alloc() throw()
{ }
- clear_alloc(clear_alloc const& _wa) throw()
+ clear_alloc(clear_alloc const&) throw() : new_allocator<T>()
{ }
template<typename T1>
- clear_alloc(clear_alloc<T1> const& _wa) throw()
+ clear_alloc(clear_alloc<T1> const&) throw()
{ }
virtual ~clear_alloc() throw()
Index: testsuite/23_containers/set/modifiers/16728.cc
===================================================================
--- testsuite/23_containers/set/modifiers/16728.cc (revision 108948)
+++ testsuite/23_containers/set/modifiers/16728.cc (working copy)
@@ -75,7 +75,7 @@
template<typename Container>
void
- test_container(Container obj, bool run_threaded = false)
+ test_container(Container, bool run_threaded = false)
{
do_loop<Container>();
std::ostringstream comment;
Index: testsuite/testsuite_iterators.h
===================================================================
--- testsuite/testsuite_iterators.h (revision 108948)
+++ testsuite/testsuite_iterators.h (working copy)
@@ -144,6 +144,7 @@
{
ptr = in.ptr;
SharedInfo = in.SharedInfo;
+ return *this;
}
output_iterator_wrapper&
@@ -394,6 +395,7 @@
{
this->ptr = in.ptr;
this->SharedInfo = in.SharedInfo;
+ return *this;
}
random_access_iterator_wrapper&
Index: testsuite/testsuite_allocator.h
===================================================================
--- testsuite/testsuite_allocator.h (revision 108948)
+++ testsuite/testsuite_allocator.h (working copy)
@@ -184,7 +184,7 @@
check_new(Alloc a = Alloc())
{
bool test __attribute__((unused)) = true;
- typename Alloc::pointer p = a.allocate(10);
+ typename Alloc::pointer p __attribute__((unused)) = a.allocate(10);
test &= ( new_called == uses_global_new );
return test;
}
@@ -208,6 +208,7 @@
Alloc a;
a.deallocate(NULL, 1);
a.deallocate(NULL, 10);
+ return true;
}
template<typename Alloc>
Index: testsuite/27_io/ios_base/storage/11584.cc
===================================================================
--- testsuite/27_io/ios_base/storage/11584.cc (revision 108948)
+++ testsuite/27_io/ios_base/storage/11584.cc (working copy)
@@ -42,12 +42,11 @@
int main ()
{
bool test __attribute__((unused)) = true;
- const int i = std::ios::xalloc ();
-
+ const int i __attribute__((unused)) = std::ios::xalloc ();
new_fails = 1;
// Successive accesses to failure storage clears to zero.
- std::cout.iword(100) = 0xdeadbeef;
+ std::cout.iword(100) = static_cast<long>(0xdeadbeef);
VERIFY(std::cout.iword(100) == 0);
// Access to pword failure storage shouldn't clear iword pword storage.
@@ -56,7 +55,7 @@
void* pv = std::cout.pword(100);
VERIFY(pv == 0);
- VERIFY(lr == 0xdeadbeef);
+ VERIFY(lr == static_cast<long>(0xdeadbeef));
return 0;
}
Index: testsuite/27_io/ios_base/types/fmtflags/bitmask_operators.cc
===================================================================
--- testsuite/27_io/ios_base/types/fmtflags/bitmask_operators.cc (revision 108948)
+++ testsuite/27_io/ios_base/types/fmtflags/bitmask_operators.cc (working copy)
@@ -33,7 +33,7 @@
#include <ios>
#include <testsuite_hooks.h>
-int main()
+void test01(std::ios_base::fmtflags i)
{
- __gnu_test::bitmask_operators<std::ios_base::fmtflags>();
+ __gnu_test::bitmask_operators<std::ios_base::fmtflags>(i);
};
Index: testsuite/27_io/ios_base/types/openmode/bitmask_operators.cc
===================================================================
--- testsuite/27_io/ios_base/types/openmode/bitmask_operators.cc (revision 108948)
+++ testsuite/27_io/ios_base/types/openmode/bitmask_operators.cc (working copy)
@@ -33,7 +33,7 @@
#include <ios>
#include <testsuite_hooks.h>
-int main()
+int main(std::ios_base::openmode i)
{
- __gnu_test::bitmask_operators<std::ios_base::openmode>();
+ __gnu_test::bitmask_operators<std::ios_base::openmode>(i);
};
Index: testsuite/27_io/ios_base/types/iostate/bitmask_operators.cc
===================================================================
--- testsuite/27_io/ios_base/types/iostate/bitmask_operators.cc (revision 108948)
+++ testsuite/27_io/ios_base/types/iostate/bitmask_operators.cc (working copy)
@@ -33,7 +33,7 @@
#include <ios>
#include <testsuite_hooks.h>
-int main()
+void test01(std::ios_base::iostate i)
{
- __gnu_test::bitmask_operators<std::ios_base::iostate>();
+ __gnu_test::bitmask_operators<std::ios_base::iostate>(i);
};
Index: testsuite/27_io/basic_streambuf/in_avail/wchar_t/1.cc
===================================================================
--- testsuite/27_io/basic_streambuf/in_avail/wchar_t/1.cc (revision 108948)
+++ testsuite/27_io/basic_streambuf/in_avail/wchar_t/1.cc (working copy)
@@ -39,7 +39,7 @@
typedef size_t size_type;
bool test __attribute__((unused)) = true;
- std::streamoff strmof_1, strmof_2;
+ std::streamoff strmof_1;
testbuf sb01;
// int in_avail()
Index: testsuite/27_io/basic_streambuf/in_avail/char/1.cc
===================================================================
--- testsuite/27_io/basic_streambuf/in_avail/char/1.cc (revision 108948)
+++ testsuite/27_io/basic_streambuf/in_avail/char/1.cc (working copy)
@@ -39,7 +39,7 @@
typedef size_t size_type;
bool test __attribute__((unused)) = true;
- std::streamoff strmof_1, strmof_2;
+ std::streamoff strmof_1;
testbuf sb01;
// int in_avail()
Index: testsuite/27_io/basic_ios/cons/char/3.cc
===================================================================
--- testsuite/27_io/basic_ios/cons/char/3.cc (revision 108948)
+++ testsuite/27_io/basic_ios/cons/char/3.cc (working copy)
@@ -100,11 +100,11 @@
}
static char_type
- to_char_type(const int_type& __c)
+ to_char_type(const int_type&)
{ return char_type(); }
static int_type
- to_int_type(const char_type& __c) { return int_type(); }
+ to_int_type(const char_type&) { return int_type(); }
static bool
eq_int_type(const int_type& __c1, const int_type& __c2)
Index: testsuite/27_io/types/1.cc
===================================================================
--- testsuite/27_io/types/1.cc (revision 108948)
+++ testsuite/27_io/types/1.cc (working copy)
@@ -25,8 +25,8 @@
// Annex D, deprecated.
void test01()
{
- std::ios_base::streampos spos;
- std::ios_base::streamoff soff;
+ std::ios_base::streampos __attribute__((unused)) spos;
+ std::ios_base::streamoff __attribute__((unused)) soff;
}
int main(void)
Index: testsuite/27_io/basic_istream/ignore/wchar_t/2.cc
===================================================================
--- testsuite/27_io/basic_istream/ignore/wchar_t/2.cc (revision 108948)
+++ testsuite/27_io/basic_istream/ignore/wchar_t/2.cc (working copy)
@@ -51,7 +51,8 @@
while (stream.ignore(numeric_limits<streamsize>::max(), delim).good())
{
index_new = str.find(delim, index);
- VERIFY( stream.gcount() == index_new - index + 1 );
+ VERIFY( static_cast<string::size_type>(stream.gcount()) ==
+ index_new - index + 1 );
index = index_new + 1;
++n;
}
Index: testsuite/27_io/basic_istream/ignore/char/2.cc
===================================================================
--- testsuite/27_io/basic_istream/ignore/char/2.cc (revision 108948)
+++ testsuite/27_io/basic_istream/ignore/char/2.cc (working copy)
@@ -49,7 +49,8 @@
while (stream.ignore(numeric_limits<streamsize>::max(), delim).good())
{
index_new = str.find(delim, index);
- VERIFY( stream.gcount() == index_new - index + 1 );
+ VERIFY( static_cast<string::size_type>(stream.gcount()) ==
+ index_new - index + 1 );
index = index_new + 1;
++n;
}
Index: testsuite/27_io/basic_istream/getline/wchar_t/5.cc
===================================================================
--- testsuite/27_io/basic_istream/getline/wchar_t/5.cc (revision 108948)
+++ testsuite/27_io/basic_istream/getline/wchar_t/5.cc (working copy)
@@ -51,7 +51,8 @@
while (stream.getline(buf, sizeof(buf) / sizeof(wchar_t), delim))
{
index_new = str.find(delim, index);
- VERIFY( stream.gcount() == index_new - index + 1 );
+ VERIFY( static_cast<string::size_type>(stream.gcount()) ==
+ index_new - index + 1 );
VERIFY( !str.compare(index, index_new - index, buf) );
index = index_new + 1;
++n;
Index: testsuite/27_io/basic_istream/getline/char/5.cc
===================================================================
--- testsuite/27_io/basic_istream/getline/char/5.cc (revision 108948)
+++ testsuite/27_io/basic_istream/getline/char/5.cc (working copy)
@@ -49,7 +49,8 @@
while (stream.getline(buf, sizeof(buf), delim))
{
index_new = str.find(delim, index);
- VERIFY( stream.gcount() == index_new - index + 1 );
+ VERIFY( static_cast<string::size_type>(stream.gcount()) ==
+ index_new - index + 1 );
VERIFY( !str.compare(index, index_new - index, buf) );
index = index_new + 1;
++n;
Index: testsuite/27_io/basic_ostream/flush/wchar_t/1.cc
===================================================================
--- testsuite/27_io/basic_ostream/flush/wchar_t/1.cc (revision 108948)
+++ testsuite/27_io/basic_ostream/flush/wchar_t/1.cc (working copy)
@@ -26,7 +26,6 @@
{
bool test __attribute__((unused)) = true;
- const wchar_t str_lit01[] = L" venice ";
const std::wstring str01(L" santa barbara ");
std::wstring str04;
std::wstring str05;
Index: testsuite/27_io/basic_ostream/flush/char/1.cc
===================================================================
--- testsuite/27_io/basic_ostream/flush/char/1.cc (revision 108948)
+++ testsuite/27_io/basic_ostream/flush/char/1.cc (working copy)
@@ -28,7 +28,6 @@
{
bool test __attribute__((unused)) = true;
- const char str_lit01[] = " venice ";
const std::string str01(" santa barbara ");
std::string str04;
std::string str05;
Index: testsuite/27_io/basic_ostream/endl/wchar_t/1.cc
===================================================================
--- testsuite/27_io/basic_ostream/endl/wchar_t/1.cc (revision 108948)
+++ testsuite/27_io/basic_ostream/endl/wchar_t/1.cc (working copy)
@@ -26,7 +26,6 @@
{
bool test __attribute__((unused)) = true;
- const wchar_t str_lit01[] = L" venice ";
const std::wstring str01(L" santa barbara ");
std::wstring str04;
std::wstring str05;
Index: testsuite/27_io/basic_ostream/endl/char/1.cc
===================================================================
--- testsuite/27_io/basic_ostream/endl/char/1.cc (revision 108948)
+++ testsuite/27_io/basic_ostream/endl/char/1.cc (working copy)
@@ -28,7 +28,6 @@
{
bool test __attribute__((unused)) = true;
- const char str_lit01[] = " venice ";
const std::string str01(" santa barbara ");
std::string str04;
std::string str05;
Index: testsuite/27_io/basic_ostream/ends/wchar_t/1.cc
===================================================================
--- testsuite/27_io/basic_ostream/ends/wchar_t/1.cc (revision 108948)
+++ testsuite/27_io/basic_ostream/ends/wchar_t/1.cc (working copy)
@@ -26,7 +26,6 @@
{
bool test __attribute__((unused)) = true;
- const wchar_t str_lit01[] = L" venice ";
const std::wstring str01(L" santa barbara ");
std::wstring str04;
std::wstring str05;
Index: testsuite/27_io/basic_ostream/ends/char/1.cc
===================================================================
--- testsuite/27_io/basic_ostream/ends/char/1.cc (revision 108948)
+++ testsuite/27_io/basic_ostream/ends/char/1.cc (working copy)
@@ -28,7 +28,6 @@
{
bool test __attribute__((unused)) = true;
- const char str_lit01[] = " venice ";
const std::string str01(" santa barbara ");
std::string str04;
std::string str05;
Index: testsuite/27_io/basic_ostream/write/wchar_t/1.cc
===================================================================
--- testsuite/27_io/basic_ostream/write/wchar_t/1.cc (revision 108948)
+++ testsuite/27_io/basic_ostream/write/wchar_t/1.cc (working copy)
@@ -40,8 +40,8 @@
void test01()
{
- bool test = true;
-
+ bool test __attribute__((unused)) = true;
+
Buf buf;
std::wostream os(&buf);
Index: testsuite/27_io/basic_ostream/write/char/1.cc
===================================================================
--- testsuite/27_io/basic_ostream/write/char/1.cc (revision 108948)
+++ testsuite/27_io/basic_ostream/write/char/1.cc (working copy)
@@ -42,8 +42,8 @@
void test01()
{
- bool test = true;
-
+ bool test __attribute__((unused)) = true;
+
Buf buf;
std::ostream os(&buf);
Index: testsuite/27_io/basic_filebuf/imbue/12206.cc
===================================================================
--- testsuite/27_io/basic_filebuf/imbue/12206.cc (revision 108948)
+++ testsuite/27_io/basic_filebuf/imbue/12206.cc (working copy)
@@ -65,21 +65,21 @@
static locale::id id;
protected:
- virtual result do_out(mbstate_t&, const Char* from,
- const Char* from_end,
- const Char*& from_next, char* to,
- char* to_limit, char*& to_next) const
+ virtual result do_out(mbstate_t&, const Char*,
+ const Char*,
+ const Char*&, char*,
+ char*, char*&) const
{ return ok; }
- virtual result do_in(mbstate_t&, const char* from,
- const char* from_end,
- const char*& from_next, Char* to,
- Char* to_limit, Char*& to_next) const
+ virtual result do_in(mbstate_t&, const char*,
+ const char*,
+ const char*&, Char*,
+ Char*, Char*&) const
{ return ok; }
- virtual result do_unshift(mbstate_t&, char* to, char*,
- char*& to_next) const
+ virtual result do_unshift(mbstate_t&, char*, char*,
+ char*&) const
{ return noconv; }
- virtual int do_length(mbstate_t&, const char* from,
- const char* from_end, size_t max) const
+ virtual int do_length(mbstate_t&, const char*,
+ const char*, size_t) const
{ return 1; }
virtual int do_encoding() const throw()
{ return 1; }
Index: testsuite/27_io/basic_filebuf/close/char/2.cc
===================================================================
--- testsuite/27_io/basic_filebuf/close/char/2.cc (revision 108948)
+++ testsuite/27_io/basic_filebuf/close/char/2.cc (working copy)
@@ -43,7 +43,7 @@
void test_02()
{
bool test __attribute__((unused)) = true;
- int close_num;
+ int close_num = 0;
// read (ext)
FILE* f2 = fopen(name_01, "r");
Index: testsuite/testsuite_hooks.h
===================================================================
--- testsuite/testsuite_hooks.h (revision 108948)
+++ testsuite/testsuite_hooks.h (working copy)
@@ -104,17 +104,15 @@
// bitmask_operators
template<typename bitmask_type>
void
- bitmask_operators()
+ bitmask_operators(bitmask_type a)
{
- bitmask_type a;
- bitmask_type b;
- a | b;
- a & b;
- a ^ b;
- ~b;
- a |= b; // set
- a &= ~b; // clear
- a ^= b;
+ a | a;
+ a & a;
+ a ^ a;
+ ~a;
+ a |= a; // set
+ a &= ~a; // clear
+ a ^= a;
}
// Simple callback structure for variable numbers of tests (all with
@@ -168,13 +166,13 @@
};
inline bool
- operator==(const NonDefaultConstructible& lhs,
- const NonDefaultConstructible& rhs)
+ operator==(const NonDefaultConstructible&,
+ const NonDefaultConstructible&)
{ return false; }
inline bool
- operator<(const NonDefaultConstructible& lhs,
- const NonDefaultConstructible& rhs)
+ operator<(const NonDefaultConstructible&,
+ const NonDefaultConstructible&)
{ return false; }
Index: testsuite/21_strings/basic_string/capacity/1.cc
===================================================================
--- testsuite/21_strings/basic_string/capacity/1.cc (revision 108948)
+++ testsuite/21_strings/basic_string/capacity/1.cc (working copy)
@@ -28,11 +28,11 @@
template<typename T>
bool
- operator==(const A<T>& a, const A<T>& b) { return true; }
+ operator==(const A<T>&, const A<T>&) { return true; }
template<typename T>
bool
- operator<(const A<T>& a, const A<T>& b) { return true; }
+ operator<(const A<T>&, const A<T>&) { return true; }
struct B { };
@@ -104,11 +104,11 @@
}
static char_type
- to_char_type(const int_type& __c)
+ to_char_type(const int_type&)
{ return char_type(); }
static int_type
- to_int_type(const char_type& __c) { return int_type(); }
+ to_int_type(const char_type&) { return int_type(); }
static bool
eq_int_type(const int_type& __c1, const int_type& __c2)
Index: testsuite/21_strings/c_strings/wchar_t/24559.cc
===================================================================
--- testsuite/21_strings/c_strings/wchar_t/24559.cc (revision 108948)
+++ testsuite/21_strings/c_strings/wchar_t/24559.cc (working copy)
@@ -26,7 +26,7 @@
int main()
{
typedef wchar_t* (*pf)(wchar_t *, const wchar_t*);
- pf p1 = std::wcspbrk;
+ pf p1 __attribute__((unused)) = std::wcspbrk;
return 0;
}
Index: testsuite/testsuite_character.h
===================================================================
--- testsuite/testsuite_character.h (revision 108948)
+++ testsuite/testsuite_character.h (working copy)
@@ -323,7 +323,7 @@
{ }
virtual bool
- do_is(mask m, char_type c) const
+ do_is(mask, char_type) const
{ return false; }
virtual const char_type*
@@ -334,11 +334,11 @@
}
virtual const char_type*
- do_scan_is(mask m, const char_type* low, const char_type* high) const
+ do_scan_is(mask, const char_type*, const char_type* high) const
{ return high; }
virtual const char_type*
- do_scan_not(mask m, const char_type* low, const char_type* high) const
+ do_scan_not(mask, const char_type* low, const char_type*) const
{ return low; }
virtual char_type
@@ -346,7 +346,7 @@
{ return c; }
virtual const char_type*
- do_toupper(char_type* low, const char_type* high) const
+ do_toupper(char_type*, const char_type* high) const
{ return high; }
virtual char_type
@@ -354,7 +354,7 @@
{ return c; }
virtual const char_type*
- do_tolower(char_type* low, const char_type* high) const
+ do_tolower(char_type*, const char_type* high) const
{ return high; }
virtual char_type
Index: testsuite/26_numerics/valarray/valarray_subset_assignment.cc
===================================================================
--- testsuite/26_numerics/valarray/valarray_subset_assignment.cc (revision 108948)
+++ testsuite/26_numerics/valarray/valarray_subset_assignment.cc (working copy)
@@ -35,14 +35,13 @@
bool check_array(std::valarray<double>& a, double b[])
{
- for (int i=0; i < a.size(); i++)
+ for (unsigned int i=0; i < a.size(); i++)
if (a[i] != b[i]) return false;
return true;
}
int main()
{
- double dvar = 1.0;
std::valarray<double> val_d(10); // 0 1 2 3 4 5 6 7 8 9
std::valarray<double> val_d1(10); // 10 9 8 7 6 5 4 3 2 1
Index: testsuite/20_util/functional/binders/1.cc
===================================================================
--- testsuite/20_util/functional/binders/1.cc (revision 108948)
+++ testsuite/20_util/functional/binders/1.cc (working copy)
@@ -27,12 +27,12 @@
{
void f_void_int_const(int) const {}
void f_void_int(int) {}
- int f_int_int_const(int) const {}
- int f_int_int(int) {}
+ int f_int_int_const(int) const { return 1; }
+ int f_int_int(int) {return 1; }
void f_void_void_const() const {}
void f_void_void() {}
- int f_int_void_const() const {}
- int f_int_void() {}
+ int f_int_void_const() const { return 1; }
+ int f_int_void() { return 1; }
};
void test01(s& a)
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |