Return-Path: Delivered-To: apmail-stdcxx-commits-archive@www.apache.org Received: (qmail 62250 invoked from network); 13 Sep 2009 22:47:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Sep 2009 22:47:01 -0000 Received: (qmail 36025 invoked by uid 500); 13 Sep 2009 22:47:01 -0000 Delivered-To: apmail-stdcxx-commits-archive@stdcxx.apache.org Received: (qmail 35991 invoked by uid 500); 13 Sep 2009 22:47:01 -0000 Mailing-List: contact commits-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list commits@stdcxx.apache.org Received: (qmail 35982 invoked by uid 99); 13 Sep 2009 22:47:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Sep 2009 22:47:01 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Sep 2009 22:46:48 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8CC8F238889D; Sun, 13 Sep 2009 22:46:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r814418 - in /stdcxx/branches/4.3.x: ./ doc/stdlibug/ examples/tutorial/ include/ include/rw/ src/ src/x86/ src/x86_64/ tests/algorithms/ tests/containers/ tests/iostream/ tests/localization/ tests/numerics/ tests/regress/ tests/self/ tests... Date: Sun, 13 Sep 2009 22:46:25 -0000 To: commits@stdcxx.apache.org From: sebor@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090913224626.8CC8F238889D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sebor Date: Sun Sep 13 22:46:24 2009 New Revision: 814418 URL: http://svn.apache.org/viewvc?rev=814418&view=rev Log: 2009-09-13 Martin Sebor Merged revs 814395, 814400, 814401, 814405, and 814409 from branches/4.2.x. 2009-09-13 Martin Sebor * tests/regress/23.vector.stdcxx-1037.cpp (Alloc::Alloc(const Alloc&)): Corrected syntax to prevent compiler errors. (Does a recent version of any compiler actually allow this? Maybe Visual C++?) 2009-09-13 Martin Sebor STDCXX-791 * include/deque.cc (deque::_C_push): Parenthesized logic expression to silence gcc -Wparentheses warning. * include/list.cc (list::splice): Same. * valarray (valarray::valarray(const gslice_array&, gslice_array::operator=, gslice_array::operator*=, gslice_array::operator/=, gslice_array::operator+=, gslice_array::operator-=, gslice_array::operator%=, gslice_array::operator^=, gslice_array::operator&=, gslice_array::operator|=, gslice_array::operator<<=, gslice_array::operator>>=): Same. * tests/iostream/27.filebuf.cpp (CodeCvt::do_in): Same. * tests/numerics/26.c.math.cp (test_behavior): Same. * tests/src/locale.cpp (rw_get_wchars): Same. * (UserTraits::lt, UserTraits::compare, UserTraits::copy, UserTraits::move): Same. * tests/src/cmdopt.cpp (_rw_print_help, _rw_getbounds, rw_runopts): Same. * tests/src/23.containers.cpp (_rw_sigcat): Same. * tests/src/opt_lines.cpp (_rw_enable_line): Same. * tests/src/printf.cpp (_rw_fmtstrarray, _rw_vasnprintf_ext, _rw_fmtstr): Same. * tests/src/opt_trace.cpp (_rw_setopt_trace_mask): Same. * tests/localization/22.locale.num.put.cpp (do_test): Same. * tests/localization/22.locale.messages.cpp (open_catalog): Same. * tests/localization/22.locale.numpunct.cpp (check_numpunct): Same. * tests/localization/22.locale.time.get.cpp (do_test): Same. * tests/localization/22.locale.money.get.cpp (do_test): Same. * tests/localization/22.locale.num.get.cpp (do_test): Same. * tests/self/0.fnmatch.cpp (test): Same. * tests/strings/21.string.compare.cpp (test_compare): Same. * tests/strings/21.string.io.cpp (test_io): Same. * tests/containers/23.vector.cons.cpp (test_ctors): Same. * tests/algorithms/25.equal.cpp (test_equal): Same. * tests/algorithms/25.transform.cpp (gen_test): Same. * tests/algorithms/25.replace.cpp (test_replace): Same. * util/collate.cpp (Def::process_order_stmt): Same. * examples/tutorial/icecream.cpp (irand): Same. * tests/support/18.numeric.special.float.cpp (VERIFY_FUNCTION): Same. * tests/iostream/27.filebuf.codecvt.cpp (cformat::do_in): Same. (run_test): Changed the type of a local to silence gcc's -Wsign-compare warnings. * include/rw/_ioiter.h (istreambuf_iterator::equal): Simplified expression to silence gcc -Wparentheses warning and to help gcc generate more optimal code (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38126). * tests/iostream/27.istream.sentry.cpp (test_ok): Same. 2009-09-13 Martin Sebor STDCXX-791 * include/valarray (valarray::valarray(const gslice_array&, gslice_array::operator=, gslice_array::operator*=, gslice_array::operator/=, gslice_array::operator+=, gslice_array::operator-=, gslice_array::operator%=, gslice_array::operator^=, gslice_array::operator&=, gslice_array::operator|=, gslice_array::operator<<=, gslice_array::operator>>=): Parenthesized logic expression to silence gcc -Wparentheses warning. (Missed in r814400). 2009-09-13 Martin Sebor STDCXX-791 * tests/src/char.cpp (UserTraits::lt, UserTraits::compare, UserTraits::copy, UserTraits::move): Parenthesized logic expression to silence gcc -Wparentheses warning. (Missed in r814400). 2009-09-13 Martin Sebor * tests/localization/22.locale.ctype.tolower.cpp (locale_list): Removed unused global variable to silence gcc -Wshadow warnings. * tests/localization/22.locale.messages.mt.cpp (run_test): Silenced gcc's -Wunused warning, corrected a logic error in a preprocessor conditional and fixed a typo. * tests/localization/22.locale.statics.mt.cpp (test_global): Changed type of a local variable to avoid gcc's -Wsign-compare warnings. * tests/regress/22.locale.messages.stdcxx-542.cpp (run_test): Same. * tests/containers/23.bitset.cpp (test_ctors, stress_ctors, test_operators, test_other, stress_count, test_elem_access, test_to_string): Corrected formatting directive for size_t argument. * tests/regress/23.set.stdcxx-216.cpp (Value::Value(unsigned): Renamed a function formal argument to avoid a gcc -Wshadow warning. Removed commented out debugging code. * tests/regress/21.string.append.stdcxx-438.cpp (operator new): Threw std::bad_alloc on failure as required instead of returning null to silence a gcc warning. * tests/regress/21.string.replace.stdcxx-175.cpp (main): Removed unused arguments to silence gcc -Wunused warnings. * tests/regress/23.list.special.stdcxx-334.cpp (operator==, operator!=, main): Same. * tests/regress/23.list.insert.stdcxx-331.cpp (main): Same. * tests/regress/21.string.stdcxx-466.cpp (main): Same. * tests/regress/23.list.cons.stdcxx-268.cpp (main): Same. * util/locale.cpp (write_coll_info): Removed an empty else branch to silence a gcc -Wmissing-braces warning. * util/exec.cpp (wait_for_child): Added braces to silence a gcc -Wmissing-braces warning. Modified: stdcxx/branches/4.3.x/ (props changed) stdcxx/branches/4.3.x/doc/stdlibug/14-3.html (props changed) stdcxx/branches/4.3.x/examples/tutorial/icecream.cpp stdcxx/branches/4.3.x/include/deque.cc stdcxx/branches/4.3.x/include/list.cc stdcxx/branches/4.3.x/include/rw/_ioiter.h stdcxx/branches/4.3.x/include/valarray stdcxx/branches/4.3.x/src/ (props changed) stdcxx/branches/4.3.x/src/atomic-cxx.S (props changed) stdcxx/branches/4.3.x/src/x86/ (props changed) stdcxx/branches/4.3.x/src/x86_64/ (props changed) stdcxx/branches/4.3.x/tests/algorithms/25.equal.cpp stdcxx/branches/4.3.x/tests/algorithms/25.replace.cpp stdcxx/branches/4.3.x/tests/algorithms/25.transform.cpp stdcxx/branches/4.3.x/tests/containers/23.bitset.cpp stdcxx/branches/4.3.x/tests/containers/23.vector.cons.cpp stdcxx/branches/4.3.x/tests/iostream/27.filebuf.codecvt.cpp stdcxx/branches/4.3.x/tests/iostream/27.filebuf.cpp stdcxx/branches/4.3.x/tests/iostream/27.istream.sentry.cpp stdcxx/branches/4.3.x/tests/localization/22.locale.ctype.tolower.cpp stdcxx/branches/4.3.x/tests/localization/22.locale.messages.cpp stdcxx/branches/4.3.x/tests/localization/22.locale.messages.mt.cpp stdcxx/branches/4.3.x/tests/localization/22.locale.money.get.cpp stdcxx/branches/4.3.x/tests/localization/22.locale.num.get.cpp stdcxx/branches/4.3.x/tests/localization/22.locale.num.put.cpp stdcxx/branches/4.3.x/tests/localization/22.locale.numpunct.cpp stdcxx/branches/4.3.x/tests/localization/22.locale.statics.mt.cpp stdcxx/branches/4.3.x/tests/localization/22.locale.time.get.cpp stdcxx/branches/4.3.x/tests/numerics/26.c.math.cpp stdcxx/branches/4.3.x/tests/regress/21.string.append.stdcxx-438.cpp stdcxx/branches/4.3.x/tests/regress/21.string.replace.stdcxx-175.cpp stdcxx/branches/4.3.x/tests/regress/21.string.stdcxx-466.cpp stdcxx/branches/4.3.x/tests/regress/22.locale.messages.stdcxx-542.cpp stdcxx/branches/4.3.x/tests/regress/23.list.cons.stdcxx-268.cpp stdcxx/branches/4.3.x/tests/regress/23.list.insert.stdcxx-331.cpp stdcxx/branches/4.3.x/tests/regress/23.list.special.stdcxx-334.cpp stdcxx/branches/4.3.x/tests/regress/23.set.stdcxx-216.cpp stdcxx/branches/4.3.x/tests/regress/23.vector.stdcxx-1037.cpp stdcxx/branches/4.3.x/tests/self/0.fnmatch.cpp stdcxx/branches/4.3.x/tests/src/23.containers.cpp stdcxx/branches/4.3.x/tests/src/char.cpp stdcxx/branches/4.3.x/tests/src/cmdopt.cpp stdcxx/branches/4.3.x/tests/src/locale.cpp stdcxx/branches/4.3.x/tests/src/opt_lines.cpp stdcxx/branches/4.3.x/tests/src/opt_trace.cpp stdcxx/branches/4.3.x/tests/src/printf.cpp stdcxx/branches/4.3.x/tests/strings/21.string.compare.cpp stdcxx/branches/4.3.x/tests/strings/21.string.io.cpp stdcxx/branches/4.3.x/tests/support/18.numeric.special.float.cpp stdcxx/branches/4.3.x/util/collate.cpp stdcxx/branches/4.3.x/util/exec.cpp stdcxx/branches/4.3.x/util/locale.cpp Propchange: stdcxx/branches/4.3.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Sep 13 22:46:24 2009 @@ -1 +1 @@ -/stdcxx/branches/4.2.x:684133-684134,684138,686537,693942,714208,723464,731135,731378 +/stdcxx/branches/4.2.x:684133-684134,684138,686537,693942,714208,723464,731135,731378,814395,814400-814401,814405,814409 Propchange: stdcxx/branches/4.3.x/doc/stdlibug/14-3.html ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Sep 13 22:46:24 2009 @@ -1 +1 @@ -/stdcxx/branches/4.2.x/doc/stdlibug/14-3.html:684133-684134,684138,686537,693942,714208,723464,731135,731378,763018 +/stdcxx/branches/4.2.x/doc/stdlibug/14-3.html:684133-684134,684138,686537,693942,714208,723464,731135,731378,763018,814395,814400-814401,814405,814409 Modified: stdcxx/branches/4.3.x/examples/tutorial/icecream.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/examples/tutorial/icecream.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/examples/tutorial/icecream.cpp (original) +++ stdcxx/branches/4.3.x/examples/tutorial/icecream.cpp Sun Sep 13 22:46:24 2009 @@ -141,7 +141,8 @@ std::random_shuffle (seq, seq + sizeof seq / sizeof *seq); - const int rnd = (seq [0] << 11) | (seq [1] << 8) | (seq [2] << 4) + seq [3]; + const int rnd = + ((seq [0] << 11) | (seq [1] << 8) | (seq [2] << 4)) + seq [3]; return rnd % n; } Modified: stdcxx/branches/4.3.x/include/deque.cc URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/deque.cc?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/include/deque.cc (original) +++ stdcxx/branches/4.3.x/include/deque.cc Sun Sep 13 22:46:24 2009 @@ -233,8 +233,8 @@ const bool __empty = empty (); if ( __empty - || __at_back && _C_end._C_node == _C_nodes + _C_node_size - 1 - || !__at_back && _C_beg._C_node == _C_nodes) { + || (__at_back && _C_end._C_node == _C_nodes + _C_node_size - 1) + || (!__at_back && _C_beg._C_node == _C_nodes)) { _C_node_alloc_type __node_alloc (*this); Modified: stdcxx/branches/4.3.x/include/list.cc URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/list.cc?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/include/list.cc (original) +++ stdcxx/branches/4.3.x/include/list.cc Sun Sep 13 22:46:24 2009 @@ -286,7 +286,7 @@ _RWSTD_ASSERT_RANGE (__j, __k); // 23.2.2.4, p12 - check undefined behavior - _RWSTD_ASSERT (&__x != this || __i != __j && __i != __k); + _RWSTD_ASSERT (&__x != this || (__i != __j && __i != __k)); if (__j == __k) return; Modified: stdcxx/branches/4.3.x/include/rw/_ioiter.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_ioiter.h?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/include/rw/_ioiter.h (original) +++ stdcxx/branches/4.3.x/include/rw/_ioiter.h Sun Sep 13 22:46:24 2009 @@ -190,7 +190,7 @@ const bool __eof_rhs = !__rhs._C_sb || traits_type::eq_int_type (__rhs._C_sb->sgetc(), __eof); - return __eof_lhs && __eof_rhs || !__eof_lhs && !__eof_rhs; + return __eof_lhs == __eof_rhs; } Modified: stdcxx/branches/4.3.x/include/valarray URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/valarray?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/include/valarray (original) +++ stdcxx/branches/4.3.x/include/valarray Sun Sep 13 22:46:24 2009 @@ -1856,8 +1856,8 @@ _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0; - while( (!gsl->is_reseted() || !__cpt && gsl->ind_numb()) && __cpt < __rhs.size() ) - { + while ( (!gsl->is_reseted () || (!__cpt && gsl->ind_numb ())) + && __cpt < __rhs.size ()) { (*_C_array)[__i] = __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; @@ -1871,8 +1871,7 @@ _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0; - while( !gsl->is_reseted() || !__cpt && gsl->ind_numb() ) - { + while (!gsl->is_reseted () || (!__cpt && gsl->ind_numb ())) { (*_C_array)[__i] = value; __i= gsl->next_ind(); __cpt++; @@ -1889,8 +1888,8 @@ _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0; - while( (!gsl->is_reseted() || !__cpt && gsl->ind_numb()) && __cpt < __rhs.size() ) - { + while ( (!gsl->is_reseted () || (!__cpt && gsl->ind_numb ())) + && __cpt < __rhs.size ()) { (*_C_array)[__i] *= __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; @@ -1904,8 +1903,8 @@ _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0; - while( (!gsl->is_reseted() || !__cpt && gsl->ind_numb()) && __cpt < __rhs.size() ) - { + while ( (!gsl->is_reseted () || (!__cpt && gsl->ind_numb ())) + && __cpt < __rhs.size ()) { (*_C_array)[__i] /= __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; @@ -1919,8 +1918,8 @@ _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0; - while( (!gsl->is_reseted() || !__cpt && gsl->ind_numb()) && __cpt < __rhs.size() ) - { + while ( (!gsl->is_reseted () || (!__cpt && gsl->ind_numb ())) + && __cpt < __rhs.size ()) { (*_C_array)[__i] += __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; @@ -1934,8 +1933,8 @@ _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0; - while( (!gsl->is_reseted() || !__cpt && gsl->ind_numb()) && __cpt < __rhs.size() ) - { + while ( (!gsl->is_reseted() || (!__cpt && gsl->ind_numb ())) + && __cpt < __rhs.size ()) { (*_C_array)[__i] -= __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; @@ -1950,8 +1949,8 @@ _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0; - while( (!gsl->is_reseted() || !__cpt && gsl->ind_numb()) && __cpt < __rhs.size() ) - { + while ( (!gsl->is_reseted () || (!__cpt && gsl->ind_numb ())) + && __cpt < __rhs.size ()) { (*_C_array)[__i] %= __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; @@ -1965,8 +1964,8 @@ _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0; - while( (!gsl->is_reseted() || !__cpt && gsl->ind_numb()) && __cpt < __rhs.size() ) - { + while ( (!gsl->is_reseted () || (!__cpt && gsl->ind_numb ())) + && __cpt < __rhs.size ()) { (*_C_array)[__i] ^= __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; @@ -1980,8 +1979,8 @@ _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0; - while( (!gsl->is_reseted() || !__cpt && gsl->ind_numb()) && __cpt < __rhs.size() ) - { + while ( (!gsl->is_reseted() || (!__cpt && gsl->ind_numb ())) + && __cpt < __rhs.size ()) { (*_C_array)[__i] &= __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; @@ -1995,8 +1994,8 @@ _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0; - while( (!gsl->is_reseted() || !__cpt && gsl->ind_numb()) && __cpt < __rhs.size() ) - { + while ( (!gsl->is_reseted() || (!__cpt && gsl->ind_numb ())) + && __cpt < __rhs.size ()) { (*_C_array)[__i] |= __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; @@ -2010,8 +2009,8 @@ _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0; - while( (!gsl->is_reseted() || !__cpt && gsl->ind_numb()) && __cpt < __rhs.size() ) - { + while ( (!gsl->is_reseted () || (!__cpt && gsl->ind_numb ())) + && __cpt < __rhs.size ()) { (*_C_array)[__i] <<= __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; @@ -2025,8 +2024,8 @@ _RWSTD_SIZE_T __i = gsl->next_ind(); _RWSTD_SIZE_T __cpt = 0; - while( (!gsl->is_reseted() || !__cpt && gsl->ind_numb()) && __cpt < __rhs.size() ) - { + while ( (!gsl->is_reseted () || (!__cpt && gsl->ind_numb ())) + && __cpt < __rhs.size ()) { (*_C_array)[__i] >>= __rhs[__cpt]; __i= gsl->next_ind(); __cpt++; @@ -2158,8 +2157,7 @@ _RWSTD_SIZE_T __i = __sl.next_ind(); _RWSTD_SIZE_T __cpt = 0; - while( !__sl.is_reseted() || !__cpt && __maxinx ) - { + while (!__sl.is_reseted () || (!__cpt && __maxinx)) { __tmp[__cpt] = (*(sl_ar.get_ref_mem_array()))[__i]; __i= __sl.next_ind(); __cpt++; Propchange: stdcxx/branches/4.3.x/src/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Sep 13 22:46:24 2009 @@ -1 +1 @@ -/stdcxx/branches/4.2.x/src:684133-684134,684138,686537,693942,714208,723464,731135,731378,778780,778800,778803 +/stdcxx/branches/4.2.x/src:684133-684134,684138,686537,693942,714208,723464,731135,731378,778780,778800,778803,814395,814400-814401,814405,814409 Propchange: stdcxx/branches/4.3.x/src/atomic-cxx.S ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Sep 13 22:46:24 2009 @@ -1 +1 @@ -/stdcxx/branches/4.2.x/src/atomic-cxx.S:684133-684134,684138,686537,693942,714208,723464,731135,731378,746865,778780,778800,778803 +/stdcxx/branches/4.2.x/src/atomic-cxx.S:684133-684134,684138,686537,693942,714208,723464,731135,731378,746865,778780,778800,778803,814395,814400-814401,814405,814409 Propchange: stdcxx/branches/4.3.x/src/x86/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Sep 13 22:46:24 2009 @@ -1 +1 @@ -/stdcxx/branches/4.2.x/src/x86:684133-684134,684138,686537,693942,697875,697883,700495,700810,700888,701135,702179,702195,702931,703124,703216,714208,723464,731135,731378,778780,778800,778803 +/stdcxx/branches/4.2.x/src/x86:684133-684134,684138,686537,693942,697875,697883,700495,700810,700888,701135,702179,702195,702931,703124,703216,714208,723464,731135,731378,778780,778800,778803,814395,814400-814401,814405,814409 Propchange: stdcxx/branches/4.3.x/src/x86_64/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Sep 13 22:46:24 2009 @@ -1 +1 @@ -/stdcxx/branches/4.2.x/src/x86_64:684133-684134,684138,686537,693942,697875,697883,700495,700810,700888,701135,702179,702195,702931,703124,703216,714208,723464,731135,731378,778780,778800,778803 +/stdcxx/branches/4.2.x/src/x86_64:684133-684134,684138,686537,693942,697875,697883,700495,700810,700888,701135,702179,702195,702931,703124,703216,714208,723464,731135,731378,778780,778800,778803,814395,814400-814401,814405,814409 Modified: stdcxx/branches/4.3.x/tests/algorithms/25.equal.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/algorithms/25.equal.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/algorithms/25.equal.cpp (original) +++ stdcxx/branches/4.3.x/tests/algorithms/25.equal.cpp Sun Sep 13 22:46:24 2009 @@ -125,7 +125,7 @@ } // verify 25.1.8, p1 - int success = res && i < mid_inx || !res && mid_inx <= i; + int success = (res && i < mid_inx) || (!res && mid_inx <= i); const bool equal_expected = i < mid_inx; Modified: stdcxx/branches/4.3.x/tests/algorithms/25.replace.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/algorithms/25.replace.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/algorithms/25.replace.cpp (original) +++ stdcxx/branches/4.3.x/tests/algorithms/25.replace.cpp Sun Sep 13 22:46:24 2009 @@ -210,8 +210,7 @@ success = val != src [i] - || val == src [i] - && replace_with.origin_ == xsrc [i].origin_; + || (val == src [i] && replace_with.origin_ == xsrc [i].origin_); if (!success) break; @@ -324,8 +323,7 @@ for (i = 0; i != nsrc; ++i) { success = val != src [i] - || val == src [i] - && replace_with.origin_ == xdst [i].origin_; + || (val == src [i] && replace_with.origin_ == xdst [i].origin_); if (!success) break; Modified: stdcxx/branches/4.3.x/tests/algorithms/25.transform.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/algorithms/25.transform.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/algorithms/25.transform.cpp (original) +++ stdcxx/branches/4.3.x/tests/algorithms/25.transform.cpp Sun Sep 13 22:46:24 2009 @@ -300,7 +300,7 @@ ////////////////////////////////////////////////////////////////// if (rw_opt_no_input_iter) { - if (1 == tag1 || 0 == tag1 && 1 == tag2) + if (1 == tag1 || (0 == tag1 && 1 == tag2)) rw_note (0, __FILE__, __LINE__, "InputIterator test disabled"); } else { @@ -316,7 +316,7 @@ ////////////////////////////////////////////////////////////////// if (rw_opt_no_fwd_iter) { - if (tag1 || !tag1 && tag2 || !tag1 && !tag2 && tag3) + if (tag1 || (!tag1 && tag2) || (!tag1 && !tag2 && tag3)) rw_note (0, __FILE__, __LINE__, "ForwardIterator test disabled"); } else { @@ -344,7 +344,7 @@ ////////////////////////////////////////////////////////////////// if (rw_opt_no_bidir_iter) { - if (tag1 || !tag1 && tag2 || !tag1 && !tag2 && tag3) + if (tag1 || (!tag1 && tag2) || (!tag1 && !tag2 && tag3)) rw_note (0, __FILE__, __LINE__, "BidirectionalIterator test disabled"); } @@ -373,7 +373,7 @@ ////////////////////////////////////////////////////////////////// if (rw_opt_no_rnd_iter) { - if (tag1 || !tag1 && tag2 || !tag1 && !tag2 && tag3) + if (tag1 || (!tag1 && tag2) || (!tag1 && !tag2 && tag3)) rw_note (0, __FILE__, __LINE__, "RandomAccessIterator test disabled"); } Modified: stdcxx/branches/4.3.x/tests/containers/23.bitset.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/containers/23.bitset.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/containers/23.bitset.cpp (original) +++ stdcxx/branches/4.3.x/tests/containers/23.bitset.cpp Sun Sep 13 22:46:24 2009 @@ -379,25 +379,25 @@ const ULong bmask = ULong (::bitmax (N)); { // bitset::bitset() - rw_info (0, 0, __LINE__, "std::bitset<%d>::bitset()", N); + rw_info (0, 0, __LINE__, "std::bitset<%zu>::bitset()", N); const std::bitset b; rw_assert (0 == b.to_ulong (), 0, __LINE__, - "bitset<%d>::bitset ().to_ulong() == 0, got %#lx", + "bitset<%zu>::bitset ().to_ulong() == 0, got %#lx", b.to_ulong ()); } { // bitset::bitset (unsigned long) - rw_info (0, 0, __LINE__, "std::bitset<%d>::bitset (unsigned long)", N); + rw_info (0, 0, __LINE__, "std::bitset<%zu>::bitset (unsigned long)", N); const std::bitset b (ULONG_MAX & bmask); rw_assert ((ULONG_MAX & bmask) == b.to_ulong (), 0, __LINE__, - "bitset<%d>::bitset (%#lx).to_ulong() == 0, got %#lx", + "bitset<%zu>::bitset (%#lx).to_ulong() == 0, got %#lx", N, ULONG_MAX & bmask, b.to_ulong ()); } { // bitset (const string& str, size_t pos = 0, size_t n = (size_t)-1); - rw_info (0, 0, __LINE__, "std::bitset<%d>::bitset (string)", N); + rw_info (0, 0, __LINE__, "std::bitset<%zu>::bitset (string)", N); test_set ts; ts.set (); @@ -407,12 +407,12 @@ if (N <= sizeof (unsigned long) * CHAR_BIT) rw_assert (b == bmask, 0, __LINE__, - "bitset<%d>::bitset(string(\"%s\").to_ulong()" + "bitset<%zu>::bitset(string(\"%s\").to_ulong()" " == %#x, got %#x", N, ts.bits (), bmask, b.to_ulong ()); else rw_assert (test_set(b) == ts, 0, __LINE__, - "bitset<%d>::bitset(string(\"111...111\")" + "bitset<%zu>::bitset(string(\"111...111\")" " == 111...111, got %s", N, test_set(b).bits ()); @@ -423,24 +423,24 @@ } { // bitset (const bitset& rhs) - rw_info (0, 0, __LINE__, "std::bitset<%d>::bitset (const bitset&)", N); + rw_info (0, 0, __LINE__, "std::bitset<%zu>::bitset (const bitset&)", N); const std::bitset b1 (12345); const std::bitset b2 (b1); rw_assert (b1.to_ulong () == b2.to_ulong (), 0, __LINE__, - "bitset<%d>::bitset (bitset<%d>(%#lx)).to_ulong() == %#lx," - " got %#lx", N, b1.to_ulong (), b2.to_ulong ()); + "bitset<%zu>::bitset (bitset<%1$zu>(%#lx)).to_ulong() " + "== %#2$lx, got %#lx", N, b1.to_ulong (), b2.to_ulong ()); rw_info (0, 0, __LINE__, - "std::bitset<%d>::operator=(const bitset&)", N); + "std::bitset<%zu>::operator=(const bitset&)", N); std::bitset b3; b3 = b1; rw_assert (b1.to_ulong () == b3.to_ulong (), 0, __LINE__, - "bitset<%d>::bitset (bitset<%d>(%#lx)).to_ulong() == %#lx," - " got %#lx", N, b1.to_ulong (), b3.to_ulong ()); + "bitset<%zu>::bitset (bitset<%1$zu>(%#lx)).to_ulong() " + "== %#1$lx, got %#lx", N, b1.to_ulong (), b3.to_ulong ()); } } @@ -449,7 +449,7 @@ template void stress_ctors (const std::bitset*) { - rw_info (0, 0, __LINE__, "std::bitset<%d>::bitset (string)", N); + rw_info (0, 0, __LINE__, "std::bitset<%zu>::bitset (string)", N); const std::size_t max_mask = bitmax (N); @@ -462,7 +462,7 @@ const std::bitset b1 (n); rw_assert (n == b1.to_ulong (), 0, __LINE__, - "bitset<%d>::bitset(%#lx).to_ulong() == %#lx, got %#lx", + "bitset<%zu>::bitset(%#lx).to_ulong() == %#lx, got %#lx", N, n, n, b1.to_ulong ()); test_set ts; @@ -471,7 +471,7 @@ // exercise 23.3.5.1, p3 std::bitset b2 = std::bitset(std::string (ts.bits ())); rw_assert (test_set(b2) == ts, 0, __LINE__, - "bitset<%d>::bitset (\"%s\") got %s", + "bitset<%zu>::bitset (\"%s\") got %s", N, ts.bits (), b2.to_string ().c_str ()); } } @@ -482,7 +482,7 @@ void test_operators (const std::bitset*) { #define TEST_OP(op) do { \ - rw_info (!i, 0, __LINE__, "std::bitset<%d>::operator" #op \ + rw_info (!i, 0, __LINE__, "std::bitset<%zu>::operator" #op \ "= (const bitset&)", N); \ \ test_set lhs = test_set().random (); \ @@ -493,12 +493,12 @@ const std::bitset b_res = b_lhs op ## = b_rhs; \ \ rw_assert (res == test_set(b_res), 0, __LINE__, \ - "bitset<%lu>::operator" #op "= (const bitset<%lu>&):" \ + "bitset<%zu>::operator" #op "= (const bitset<%zu>&):" \ " %s " #op " %s == %s, got %s", \ N, N, lhs.bits (), rhs.bits (), res.bits (), \ test_set(b_res).bits ()); \ \ - rw_info (!i, 0, __LINE__, "std::bitset<%d>::operator" #op \ + rw_info (!i, 0, __LINE__, "std::bitset<%zu>::operator" #op \ " (const bitset&)", N); \ lhs.random (); \ b_lhs = std::bitset(std::string (lhs.bits ())); \ @@ -507,7 +507,7 @@ const std::bitset b_res2 = b_lhs op b_rhs; \ \ rw_assert (res2 == test_set(b_res2), 0, __LINE__, \ - "bitset<%lu>::operator" #op " (const bitset<%lu>&):" \ + "bitset<%zu>::operator" #op " (const bitset<%zu>&):" \ " %s " #op " %s == %s, got %s", \ N, N, lhs.bits (), rhs.bits (), res2.bits (), \ test_set(b_res2).bits ()); \ @@ -530,7 +530,7 @@ // 23.3.5.2, p5 and 23.3.5.3, p3 TEST_OP (^); - rw_info (!i, 0, __LINE__, "std::bitset<%d>::operator<<=(size_t)", N); + rw_info (!i, 0, __LINE__, "std::bitset<%zu>::operator<<=(size_t)", N); const test_set ts1 = test_set().random (); const test_set ts2 = test_set(ts1) <<= i % M; @@ -541,11 +541,11 @@ b1 <<= i % M; rw_assert (test_set(b1) == ts2, 0, __LINE__, - "bitset<%d>::operator<<=(%lu): %s << %lu == %s, got %s", + "bitset<%zu>::operator<<=(%lu): %s << %lu == %s, got %s", N, i % M, ts1.bits (), i % M, ts2.bits (), test_set(b1).bits ()); - rw_info (!i, 0, __LINE__, "std::bitset<%d>::operator>>=(size_t)", N); + rw_info (!i, 0, __LINE__, "std::bitset<%zu>::operator>>=(size_t)", N); const test_set ts3 = test_set(ts1) >>= i % M; std::bitset b2 = std::bitset(std::string (ts1.bits ())); @@ -554,32 +554,32 @@ b2 >>= i % M; rw_assert (test_set(b2) == ts3, 0, __LINE__, - "bitset<%d>::operator>>=(%lu): %s >> %lu == %s, got %s", + "bitset<%zu>::operator>>=(%lu): %s >> %lu == %s, got %s", N, i % M, ts1.bits (), i % M, ts3.bits (), test_set(b2).bits ()); rw_info (!i, 0, __LINE__, - "std::bitset<%d>::operator<<=(size_t) (unused bits)", N); + "std::bitset<%zu>::operator<<=(size_t) (unused bits)", N); if (N) { b1.set (N - 1); std::size_t first = b1.count (); std::size_t second = (b1 <<= 1).count (); rw_assert (!(first == second), 0, __LINE__, - "bitset<%lu>::operator<<=(1): " + "bitset<%zu>::operator<<=(1): " "after <<= 1: expected %lu, got %lu", N, first - 1, second); } rw_info (!i, 0, __LINE__, - "std::bitset<%d>::operator>>=(size_t) (unused bits)", N); + "std::bitset<%zu>::operator>>=(size_t) (unused bits)", N); if (N) { b2.set (); std::size_t first = b2.count (); std::size_t second = (b2 >>= 1).count (); rw_assert (first - 1 == second, 0, __LINE__, - "bitset<%lu>::operator>>=(1): " + "bitset<%zu>::operator>>=(1): " "after >>= 1: expected %lu, got %lu", N, first - 1, second); } @@ -603,13 +603,13 @@ std::bitset b2 = ~b1; rw_assert (ts2 == test_set(b2), 0, __LINE__, - "bitset<%d>::operator~(): ~%s == %s, got %s", + "bitset<%zu>::operator~(): ~%s == %s, got %s", N, ts1.bits (), ts2.bits (), test_set(b2).bits ()); // 23.3.5.2, p25 b2.flip (); rw_assert (ts1 == test_set(b2), 0, __LINE__, - "bitset<%d>::flip (): ~%s == %s, got %s", + "bitset<%zu>::flip (): ~%s == %s, got %s", N, ts1.bits (), ts2.bits (), test_set(b2).bits ()); // 23.3.5.2, p27 @@ -617,36 +617,36 @@ b2.flip (_j); rw_assert (ts2 == test_set(b2), 0, __LINE__, - "bitset<%d>::flip () == %s, got %s", + "bitset<%zu>::flip () == %s, got %s", N, ts2.bits (), test_set(b2).bits ()); // 23.3.5.3, p35 rw_assert (ts2.count () == b2.count (), 0, __LINE__, - "bitset<%d>::count () == %d, got %d [%s]", + "bitset<%zu>::count () == %zu, got %d [%s]", N, ts2.count (), b2.count (), test_set(b2).bits()); // 23.3.5.3, p37 - rw_assert (b2 == b2 && (N && !(b1 == b2) || !N && b1 == b2), + rw_assert (b2 == b2 && ((N && !(b1 == b2)) || (!N && b1 == b2)), 0, __LINE__, - "bitset<%d>::operator==(const bitset<%ul>&) [%s]", - N, N, N ? test_set(b2).bits () : ""); + "bitset<%zu>::operator== (const bitset&) [%s]", + N, N ? test_set(b2).bits () : ""); // 23.3.5.3, p38 - rw_assert ((N && b1 != b2 || !N && !(b1 != b2)) && !(b2 != b2), + rw_assert ((N && b1 != b2) || (!N && !(b1 != b2) && !(b2 != b2)), 0, __LINE__, - "bitset<%d>::operator!=(const bitset<%ul>&) [%s]", - N, N, N ? test_set(b2).bits () : ""); + "bitset<%zu>::operator!= (const bitset&) [%s]", + N, N ? test_set(b2).bits () : ""); // 23.3.5.3, p42 - rw_assert (b2.count() && b2.any() || !b2.count() && !b2.any(), + rw_assert ((b2.count () && b2.any ()) || (!b2.count () && !b2.any ()), 0, __LINE__, - "bitset<%d>::any () [%s]", + "bitset<%zu>::any () [%s]", N, test_set(b2).bits ()); // 23.3.5.3, p43 - rw_assert (b2.count() && !b2.none() || !b2.count() && b2.none(), + rw_assert ((b2.count () && !b2.none ()) || (!b2.count () && b2.none ()), 0, __LINE__, - "bitset<%d>::none () [%s]", + "bitset<%zu>::none () [%s]", N, test_set(b2).bits ()); for (std::size_t k = 0; k != N; ++k) { @@ -654,13 +654,13 @@ std::bitset b3 = b1 << k; rw_assert (test_set(b3) == ts3, 0, __LINE__, - "bitset<%lu>::operator<<(%lu)", N, k); + "bitset<%zu>::operator<< (%zu)", N, k); ts3 = test_set(ts1) >>= k; b3 = b1 >> k; rw_assert (test_set(b3) == ts3, 0, __LINE__, - "bitset<%lu>::operator>>(%lu)", N, k); + "bitset<%zu>::operator>> (%zu)", N, k); } } } @@ -670,7 +670,7 @@ template void stress_count (const std::bitset*) { - rw_info (0, 0, __LINE__, "std::bitset<%lu>::count()", N); + rw_info (0, 0, __LINE__, "std::bitset<%zu>::count()", N); for (std::size_t i = 0; i != N; i++) { std::bitset b; @@ -679,7 +679,7 @@ b.set (j); rw_assert (b.count () == i, 0, __LINE__, - "%lu. std::bitset<%lu>::count()", i, N); + "%lu. std::bitset<%zu>::count()", i, N); } } @@ -688,9 +688,9 @@ template void test_elem_access (const std::bitset*) { - rw_info (0, 0, __LINE__, "std::bitset<%lu>::test(size_t)", N); - rw_info (0, 0, __LINE__, "std::bitset<%lu>::operator[](size_t)", N); - rw_info (0, 0, __LINE__, "std::bitset<%lu>::operator[](size_t) const", N); + rw_info (0, 0, __LINE__, "std::bitset<%zu>::test(size_t)", N); + rw_info (0, 0, __LINE__, "std::bitset<%zu>::operator[](size_t)", N); + rw_info (0, 0, __LINE__, "std::bitset<%zu>::operator[](size_t) const", N); for (std::size_t i = 0; i != NLOOPS; ++i) { @@ -700,18 +700,18 @@ for (std::size_t _j = 0; _j != N; ++_j) { // 23.3.5.2, p39 rw_assert (b.test (_j) == ts.test (_j), 0, __LINE__, - "bitset<%lu>::test (%lu): %s", + "bitset<%zu>::test (%lu): %s", N, _j, test_set(b).bits ()); // 23.3.5.2, p??: see lwg issue 11 rw_assert (b [_j] == ts.test (_j), 0, __LINE__, - "bitset<%lu>::operator[](%lu): %s", + "bitset<%zu>::operator[](%lu): %s", N, _j, test_set(b).bits ()); // 23.3.5.2, p??: see lwg issue 11 rw_assert (((const std::bitset&)b) [_j] == ts.test (_j), 0, __LINE__, - "bitset<%lu>::operator[](%lu) const: %s", + "bitset<%zu>::operator[](%lu) const: %s", N, _j, test_set(b).bits ()); // exercise std::bitset::reference @@ -720,18 +720,18 @@ // std::bitset::reference::flip() r.flip (); rw_assert (r == !ts.test (_j), 0, __LINE__, - "bitset<%lu>::reference::flip()", N); + "bitset<%zu>::reference::flip()", N); // std::bitset::reference::operator~() bool toggled = ~r; rw_assert (toggled == ts.test (_j), 0, __LINE__, - "bitset<%lu>::reference::operator~()", N); + "bitset<%zu>::reference::operator~()", N); // std::bitset::reference::operator=(bool) r = toggled; rw_assert (r == ts.test (_j) && b.test (_j) == ts.test (_j), 0, __LINE__, - "bitset<%lu>::reference::operator=(bool)", N); + "bitset<%zu>::reference::operator=(bool)", N); } } } @@ -1031,7 +1031,7 @@ static const char* const aname = alloc_name (Alloc ()); rw_info (0, 0, __LINE__, - "std::bitset<%lu>::to_string<%s, %s, %s >()", + "std::bitset<%zu>::to_string<%s, %s, %s >()", N, cname, tname, aname); test_set ts; @@ -1063,7 +1063,7 @@ pos = compare (str3.data (), ts.bits (), "01"); rw_assert (-1 == pos, 0, __LINE__, - "bitset<%lu>::to_string () == \"%s\", got \"%s\": " + "bitset<%zu>::to_string () == \"%s\", got \"%s\": " "mismatch at bit %d", N, ts.bits (), TO_STR (str3), pos); @@ -1071,14 +1071,14 @@ // specify one of the two function arguments (exercise the default // or the respective overload) rw_info (0, 0, __LINE__, - "std::bitset<%lu>::to_string<%s, %s, %s >(\"%s\")", + "std::bitset<%zu>::to_string<%s, %s, %s >(\"%s\")", N, cname, tname, aname, cname); str3 = bitset_to_string_3 (bs, 1, zero, one, (String3*)0); pos = compare (str3.data (), ts.bits (), "o1"); rw_assert (-1 == pos, 0, __LINE__, - "bitset<%lu>::to_string ('o') == %s, got %s: " + "bitset<%zu>::to_string ('o') == %s, got %s: " "mismatch at bit %d", N, to_string (ts.bits (), "o1").c_str (), TO_STR (str3), pos); @@ -1086,14 +1086,14 @@ // specify both of the two function arguments rw_info (0, 0, __LINE__, - "std::bitset<%lu>::to_string<%s, %s, %s >(%s, %s)", + "std::bitset<%zu>::to_string<%s, %s, %s >(%s, %s)", N, cname, tname, aname, cname, cname); str3 = bitset_to_string_3 (bs, 2, zero, one, (String3*)0); pos = compare (str3.data (), ts.bits (), "ox"); rw_assert (-1 == pos, 0, __LINE__, - "bitset<%lu>::to_string ('o', 'x') == %s, got %s: " + "bitset<%zu>::to_string ('o', 'x') == %s, got %s: " "mismatch at bit %d", N, to_string (ts.bits (), "ox").c_str (), TO_STR (str3), pos); @@ -1103,7 +1103,7 @@ // exercise the overload of the to_string() member function template // that takes the first two template parameters different from char, // and char_traits - rw_info (0, 0, __LINE__, "std::bitset<%lu>::to_string<%s, %s >()", + rw_info (0, 0, __LINE__, "std::bitset<%zu>::to_string<%s, %s >()", N, cname, tname); typedef std::allocator CharTAlloc; @@ -1117,21 +1117,21 @@ pos = compare (str2.data (), ts.bits (), "01"); rw_assert (-1 == pos, 0, __LINE__, - "bitset<%lu>::to_string () == %s, got %s: mismatch at bit %d", + "bitset<%zu>::to_string () == %s, got %s: mismatch at bit %d", N, ts.bits (), TO_STR (str2), pos); // specify one of the two function arguments (exercise the default // or the respective overload) rw_info (0, 0, __LINE__, - "std::bitset<%lu>::to_string<%s, %s >(%s)", + "std::bitset<%zu>::to_string<%s, %s >(%s)", N, cname, tname, cname); str2 = bitset_to_string_2 (bs, 1, zero, one, (String2*)0); pos = compare (str2.data (), ts.bits (), "o1"); rw_assert (-1 == pos, 0, __LINE__, - "bitset<%lu>::to_string ('o') == %s, got %s: " + "bitset<%zu>::to_string ('o') == %s, got %s: " "mismatch at bit %d", N, to_string (ts.bits (), "o1").c_str (), TO_STR (str2), pos); @@ -1139,14 +1139,14 @@ // specify both of the two function arguments rw_info (0, 0, __LINE__, - "std::bitset<%lu>::to_string<%s, %s >(%s, %s)", + "std::bitset<%zu>::to_string<%s, %s >(%s, %s)", N, cname, tname, cname, cname); str2 = bitset_to_string_2 (bs, 2, zero, one, (String2*)0); pos = compare (str2.data (), ts.bits (), "ox"); rw_assert (-1 == pos, 0, __LINE__, - "bitset<%lu>::to_string ('o', 'x') == %s, got %s: " + "bitset<%zu>::to_string ('o', 'x') == %s, got %s: " "mismatch at bit %d", N, to_string (ts.bits (), "ox").c_str (), TO_STR (str2), pos); @@ -1155,7 +1155,7 @@ //////////////////////////////////////////////////////////////////////// // exercise the overload of the to_string() member function template // that takes the first template parameter different from char - rw_info (0, 0, __LINE__, "std::bitset<%lu>::to_string<%s>()", + rw_info (0, 0, __LINE__, "std::bitset<%zu>::to_string<%s>()", N, cname); typedef std::char_traits CharTraits; @@ -1169,20 +1169,20 @@ pos = compare (str1.data (), ts.bits (), "01"); rw_assert (-1 == pos, 0, __LINE__, - "bitset<%lu>::to_string () == %s, got %s: mismatch at bit %d", + "bitset<%zu>::to_string () == %s, got %s: mismatch at bit %d", N, ts.bits (), TO_STR (str1), pos); // specify one of the two function arguments (exercise the default // or the respective overload) - rw_info (0, 0, __LINE__, "std::bitset<%lu>::to_string<%s>(%s)", + rw_info (0, 0, __LINE__, "std::bitset<%zu>::to_string<%s>(%s)", N, cname, cname); str1 = bitset_to_string_1 (bs, 1, zero, one, (String1*)0); pos = compare (str1.data (), ts.bits (), "o1"); rw_assert (-1 == pos, 0, __LINE__, - "bitset<%lu>::to_string ('o') == %s, got %s: " + "bitset<%zu>::to_string ('o') == %s, got %s: " "mismatch at bit %d", N, to_string (ts.bits (), "o1").c_str (), TO_STR (str1), pos); @@ -1190,14 +1190,14 @@ // specify both of the two function arguments rw_info (0, 0, __LINE__, - "std::bitset<%lu>::to_string<%s>(%s, %s)", + "std::bitset<%zu>::to_string<%s>(%s, %s)", N, cname, cname, cname); str1 = bitset_to_string_1 (bs, 2, zero, one, (String1*)0); pos = compare (str1.data (), ts.bits (), "ox"); rw_assert (-1 == pos, 0, __LINE__, - "bitset<%lu>::to_string ('o', 'x') == %s, got %s: " + "bitset<%zu>::to_string ('o', 'x') == %s, got %s: " "mismatch at bit %d", N, to_string (ts.bits (), "ox").c_str (), TO_STR (str1), pos); @@ -1209,7 +1209,7 @@ if (nontemplate_done) return; - rw_info (0, 0, __LINE__, "std::bitset<%lu>::to_string ()", N); + rw_info (0, 0, __LINE__, "std::bitset<%zu>::to_string ()", N); typedef std::string String0; @@ -1221,32 +1221,32 @@ pos = compare (str0.data (), ts.bits (), "01"); rw_assert (-1 == pos, 0, __LINE__, - "bitset<%lu>::to_string () == %s, got %s: mismatch at bit %d", + "bitset<%zu>::to_string () == %s, got %s: mismatch at bit %d", N, ts.bits (), str0.c_str (), pos); // specify one of the two function arguments (exercise the default // or the respective overload) - rw_info (0, 0, __LINE__, "std::bitset<%lu>::to_string (char)", N); + rw_info (0, 0, __LINE__, "std::bitset<%zu>::to_string (char)", N); str0 = bitset_to_string_0 (bs, 1, 'o', 'x', (String0*)0); pos = compare (str0.data (), ts.bits (), "o1"); rw_assert (-1 == pos, 0, __LINE__, - "bitset<%lu>::to_string ('o') == %s, got %s: " + "bitset<%zu>::to_string ('o') == %s, got %s: " "mismatch at bit %d", N, to_string (ts.bits (), "o1").c_str (), str0.c_str (), pos); // specify both of the two function arguments - rw_info (0, 0, __LINE__, "std::bitset<%lu>::to_string (char, char)", N); + rw_info (0, 0, __LINE__, "std::bitset<%zu>::to_string (char, char)", N); str0 = bitset_to_string_0 (bs, 2, 'o', 'x', (String0*)0); pos = compare (str0.data (), ts.bits (), "ox"); rw_assert (-1 == pos, 0, __LINE__, - "bitset<%lu>::to_string ('o', 'x') == %s, got %s: " + "bitset<%zu>::to_string ('o', 'x') == %s, got %s: " "mismatch at bit %d", N, to_string (ts.bits (), "ox").c_str (), str0.c_str (), pos); Modified: stdcxx/branches/4.3.x/tests/containers/23.vector.cons.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/containers/23.vector.cons.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/containers/23.vector.cons.cpp (original) +++ stdcxx/branches/4.3.x/tests/containers/23.vector.cons.cpp Sun Sep 13 22:46:24 2009 @@ -634,23 +634,23 @@ const Vector v1 (first, last, alloc); if ( i != v0.size () - || (!(i && !v0.empty () || !i && v0.empty ())) + || (!((i && !v0.empty ()) || (!i && v0.empty ()))) || (i != v1.size ()) - || (!(i && !v1.empty () || !i && v1.empty ()))) + || (!((i && !v1.empty ()) || (!i && v1.empty ())))) success = false; // verify size() and empty() rw_assert (i == v0.size (), 0, __LINE__, "size () == %zu, got %zu", i, v0.size ()); - rw_assert (i && !v0.empty () || !i && v0.empty (), + rw_assert ((i && !v0.empty ()) || (!i && v0.empty ()), 0, __LINE__, "size () == %zu, empty () == %d", v0.size (), v0.empty ()); rw_assert (i == v1.size (), 0, __LINE__, "size () == %zu, got %zu", i, v1.size ()); - rw_assert (i && !v1.empty () || !i && v1.empty (), + rw_assert ((i && !v1.empty ()) || (!i && v1.empty ()), 0, __LINE__, "size () == %zu, empty () == %d", v1.size (), v1.empty ()); } Modified: stdcxx/branches/4.3.x/tests/iostream/27.filebuf.codecvt.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/iostream/27.filebuf.codecvt.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/iostream/27.filebuf.codecvt.cpp (original) +++ stdcxx/branches/4.3.x/tests/iostream/27.filebuf.codecvt.cpp Sun Sep 13 22:46:24 2009 @@ -503,7 +503,7 @@ else if ('?' == ch && !(mask & trigraphs)) { // (try to) convert a trigraph sequence if ( 2 > from_end - from_next - || '?' == from_next [1] && 3 > from_end - from_next) { + || ('?' == from_next [1] && 3 > from_end - from_next)) { res = partial; break; } @@ -1126,17 +1126,17 @@ // if end-of-file occurs on the input sequence RW_ASSERT_STATE (f, std::ios::eofbit | std::ios::failbit); - rw_assert (long (n) == buflen, 0, __LINE__, + rw_assert (std::size_t (n) == buflen, 0, __LINE__, "ifstream::read (%#p, %d); read %ld, expected %d", tmpbuf, sizeof tmpbuf, long (n), buflen); // assert that converted file contents are the same // as the originally generated buffer - const long len = long (n) < buflen ? long (n) : buflen; - for (long i = 0; i != len; ++i) { + const long len = std::size_t (n) < buflen ? std::size_t (n) : buflen; + for (std::size_t i = 0; i != len; ++i) { if (tmpbuf [i] != buffer [i]) { rw_assert (0, 0, __LINE__, - "'\\%03o' == '\\%03o'; offset %d", + "'\\%03o' == '\\%03o'; offset %zu", (unsigned char)buffer [i], (unsigned char)tmpbuf [i], i); break; Modified: stdcxx/branches/4.3.x/tests/iostream/27.filebuf.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/iostream/27.filebuf.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/iostream/27.filebuf.cpp (original) +++ stdcxx/branches/4.3.x/tests/iostream/27.filebuf.cpp Sun Sep 13 22:46:24 2009 @@ -22,7 +22,7 @@ * implied. See the License for the specific language governing * permissions and limitations under the License. * - * Copyright 1994-2008 Rogue Wave Software. + * Copyright 1994-2008 Rogue Wave Software, Inc. * **************************************************************************/ @@ -2096,12 +2096,12 @@ return std::codecvt_base::partial; if ( from_next [0] != '\\' || from_next [1] != 'x' - || !( from_next [2] >= '0' && from_next [2] <= '9' - || from_next [2] >= 'A' && from_next [2] <= 'F' - || from_next [2] >= 'a' && from_next [2] <= 'f') - || !( from_next [3] >= '0' && from_next [3] <= '9' - || from_next [3] >= 'A' && from_next [3] <= 'F' - || from_next [3] >= 'a' && from_next [3] <= 'f')) + || !( (from_next [2] >= '0' && from_next [2] <= '9') + || (from_next [2] >= 'A' && from_next [2] <= 'F') + || (from_next [2] >= 'a' && from_next [2] <= 'f')) + || !( (from_next [3] >= '0' && from_next [3] <= '9') + || (from_next [3] >= 'A' && from_next [3] <= 'F') + || (from_next [3] >= 'a' && from_next [3] <= 'f'))) return std::codecvt_base::error; // convert a hex literal to a number Modified: stdcxx/branches/4.3.x/tests/iostream/27.istream.sentry.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/iostream/27.istream.sentry.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/iostream/27.istream.sentry.cpp (original) +++ stdcxx/branches/4.3.x/tests/iostream/27.istream.sentry.cpp Sun Sep 13 22:46:24 2009 @@ -22,7 +22,7 @@ * implied. See the License for the specific language governing * permissions and limitations under the License. * - * Copyright 2003-2006 Rogue Wave Software. + * Copyright 2003-2006 Rogue Wave Software, Inc. * **************************************************************************/ @@ -434,9 +434,8 @@ _RWSTD_UNUSED (guard); - const bool success = - is.good () && guard - || !is.good () && !guard; + // verify that both are either false or true + const bool success = !is.good () == !guard; rw_assert (success, 0, __LINE__, "%u. %{$SENTRY}" Modified: stdcxx/branches/4.3.x/tests/localization/22.locale.ctype.tolower.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/localization/22.locale.ctype.tolower.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/localization/22.locale.ctype.tolower.cpp (original) +++ stdcxx/branches/4.3.x/tests/localization/22.locale.ctype.tolower.cpp Sun Sep 13 22:46:24 2009 @@ -83,8 +83,6 @@ "{zh-CN-*-{GB*,UTF-8,CP125?}}," \ "{ru-RU-*-{KOI*,UTF-8,CP125?}}}" -const char* locale_list = 0; - #define BEGIN_LOCALE_LOOP(num, locname, loop_cntrl) \ const char* locale_list = rw_locale_query (LC_CTYPE, LOCALES); \ for (const char* locname = locale_list; \ Modified: stdcxx/branches/4.3.x/tests/localization/22.locale.messages.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/localization/22.locale.messages.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/localization/22.locale.messages.cpp (original) +++ stdcxx/branches/4.3.x/tests/localization/22.locale.messages.cpp Sun Sep 13 22:46:24 2009 @@ -376,7 +376,7 @@ cat = (msgs.open)(cat_name, loc); const bool success = - expect_success && -1 < cat || expect_failure && cat < 0; + (expect_success && -1 < cat) || (expect_failure && cat < 0); rw_assert (success, 0, line, "messages<%s>::open(%#s, locale(%#s))" Modified: stdcxx/branches/4.3.x/tests/localization/22.locale.messages.mt.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/localization/22.locale.messages.mt.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/localization/22.locale.messages.mt.cpp (original) +++ stdcxx/branches/4.3.x/tests/localization/22.locale.messages.mt.cpp Sun Sep 13 22:46:24 2009 @@ -375,13 +375,21 @@ try { const std::locale loc (data.locale_name_); - const std::messages& nm = - std::use_facet >(loc); + { + const std::messages& nm = + std::use_facet >(loc); -#ifdef _RWSTD_NO_WCHAR_T + _RWSTD_UNUSED (nm); + } - const std::messages& nm = - std::use_facet >(loc); +#ifndef _RWSTD_NO_WCHAR_T + + { + const std::messages& wm = + std::use_facet >(loc); + + _RWSTD_UNUSED (wm); + } #endif // _RWSTD_NO_WCHAR_T Modified: stdcxx/branches/4.3.x/tests/localization/22.locale.money.get.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/localization/22.locale.money.get.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/localization/22.locale.money.get.cpp (original) +++ stdcxx/branches/4.3.x/tests/localization/22.locale.money.get.cpp Sun Sep 13 22:46:24 2009 @@ -361,7 +361,7 @@ err_expect = err; const int success = - !(-1 != consumed && last - next != consumed || err != err_expect); + !((-1 != consumed && last - next != consumed) || err != err_expect); rw_assert (success, __FILE__, lineno, "money_get<%s>::get (%{*Ac}, ..., %b, ..., %s&), " @@ -393,7 +393,7 @@ last = mg.get (next, last, intl, io, err, bs); int success = - !(-1 != consumed && last - next != consumed || err != err_expect); + !((-1 != consumed && last - next != consumed) || err != err_expect); rw_assert (success, __FILE__, lineno, "money_get<%s>::get (%{*Ac}, ..., %b, ..., " @@ -418,10 +418,10 @@ int n = std::sscanf (narrow_buf, fmt, &x); success = - !( err_expect & std::ios::failbit && !*grouping - && (1 == n || bs != initial) - || !(err_expect & std::ios::failbit) - && 1 < rw_ldblcmp (x, val)); + !( ( err_expect & std::ios::failbit && !*grouping + && (1 == n || bs != initial)) + || ( !(err_expect & std::ios::failbit) + && 1 < rw_ldblcmp (x, val))); rw_assert (success, __FILE__, lineno, "money_get<%s>::get (%{*Ac}, ..., %b, ..., " Modified: stdcxx/branches/4.3.x/tests/localization/22.locale.num.get.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/localization/22.locale.num.get.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/localization/22.locale.num.get.cpp (original) +++ stdcxx/branches/4.3.x/tests/localization/22.locale.num.get.cpp Sun Sep 13 22:46:24 2009 @@ -380,7 +380,7 @@ // that the extracted value can be in success = err == err_expect - && (rw_equal (x, val) || val <= x && x <= val_max); + && (rw_equal (x, val) || (val <= x && x <= val_max)); nfailures += !success; @@ -416,8 +416,8 @@ const int n = std::sscanf (str, scanspec, &y); success = - !( err & std::ios::failbit && n > 0 - || !(err & std::ios::failbit) && 1 != n + !( (err & std::ios::failbit && n > 0) + || (!(err & std::ios::failbit) && 1 != n) || !rw_equal (x, y)); nfailures += !success; Modified: stdcxx/branches/4.3.x/tests/localization/22.locale.num.put.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/localization/22.locale.num.put.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/localization/22.locale.num.put.cpp (original) +++ stdcxx/branches/4.3.x/tests/localization/22.locale.num.put.cpp Sun Sep 13 22:46:24 2009 @@ -419,7 +419,7 @@ || '+' == fill || pun.thousands_sep_ == fill || pun.decimal_point_ == fill - || fill >= '0' && fill <= '9') + || (fill >= '0' && fill <= '9')) return; // do not perform extraction if there is no data to extract Modified: stdcxx/branches/4.3.x/tests/localization/22.locale.numpunct.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/localization/22.locale.numpunct.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/localization/22.locale.numpunct.cpp (original) +++ stdcxx/branches/4.3.x/tests/localization/22.locale.numpunct.cpp Sun Sep 13 22:46:24 2009 @@ -224,8 +224,8 @@ // check that newly constructed locale matches - if ( 'C' == locnamebuf [0] && '\0' == locnamebuf [1] - || 'C' == locname [0] && '\0' == locname [1] + if ( ('C' == locnamebuf [0] && '\0' == locnamebuf [1]) + || ('C' == locname [0] && '\0' == locname [1]) || *loc == std::locale::classic ()) { // follow requirements in 22.2.3.1.2. p1, 2, and 3 check_decimal_point (charT ('.'), tname, loc); Modified: stdcxx/branches/4.3.x/tests/localization/22.locale.statics.mt.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/localization/22.locale.statics.mt.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/localization/22.locale.statics.mt.cpp (original) +++ stdcxx/branches/4.3.x/tests/localization/22.locale.statics.mt.cpp Sun Sep 13 22:46:24 2009 @@ -93,7 +93,7 @@ static void* test_global (void*) { - for (std::size_t i = 0; i != opt_nloops; ++i) { + for (std::size_t i = 0; i != std::size_t (opt_nloops); ++i) { if (rw_thread_pool_timeout_expired ()) break; Modified: stdcxx/branches/4.3.x/tests/localization/22.locale.time.get.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/localization/22.locale.time.get.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/localization/22.locale.time.get.cpp (original) +++ stdcxx/branches/4.3.x/tests/localization/22.locale.time.get.cpp Sun Sep 13 22:46:24 2009 @@ -89,7 +89,7 @@ _TRY { if ( '\0' == fmt [1] - || ('E' == fmt [0] || 'O' == fmt [0] && '\0' == fmt [2])) { + || ('E' == fmt [0] || ('O' == fmt [0] && '\0' == fmt [2]))) { // single-character format strings "a", "b", "x", "X", and "Y" // exercise the standard time_get interface, i.e., get_weekday(), Modified: stdcxx/branches/4.3.x/tests/numerics/26.c.math.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/numerics/26.c.math.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/numerics/26.c.math.cpp (original) +++ stdcxx/branches/4.3.x/tests/numerics/26.c.math.cpp Sun Sep 13 22:46:24 2009 @@ -208,7 +208,7 @@ const float xf = std::pow (fi, j); const float yf = std::pow (fi, fj); - rw_assert (rw_equal (xf, yf) || !i && j < 0, + rw_assert (rw_equal (xf, yf) || (!i && j < 0), 0, __LINE__, "std::pow (%d.0f, %d) = %g, " "std::pow (%d,0f, %d.0f) = %g", @@ -221,7 +221,7 @@ const double xd = std::pow (id, j); const double yd = std::pow (id, jd); - rw_assert (rw_equal (xd, yd) || !i && j < 0, + rw_assert (rw_equal (xd, yd) || (!i && j < 0), 0, __LINE__, "std::pow (%d.0, %d) = %g, " "std::pow (%d.0, %d.0) = %g", @@ -235,7 +235,7 @@ const long double xl = std::pow (il, j); const long double yl = std::pow (il, jl); - rw_assert (rw_equal (xl, yl) || !i && j < 0, + rw_assert (rw_equal (xl, yl) || (!i && j < 0), 0, __LINE__, "std::pow (%d.0L, %d) = %Lg, " "std::pow (%d.0L, %d.0L) = %Lg", Modified: stdcxx/branches/4.3.x/tests/regress/21.string.append.stdcxx-438.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/regress/21.string.append.stdcxx-438.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/regress/21.string.append.stdcxx-438.cpp (original) +++ stdcxx/branches/4.3.x/tests/regress/21.string.append.stdcxx-438.cpp Sun Sep 13 22:46:24 2009 @@ -40,7 +40,7 @@ { void* const ptr = std::malloc (n + sizeof n); if (!ptr) - return 0; + throw std::bad_alloc (); std::memset (ptr, -1, n); *(std::size_t*)ptr = n; Modified: stdcxx/branches/4.3.x/tests/regress/21.string.replace.stdcxx-175.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/regress/21.string.replace.stdcxx-175.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/regress/21.string.replace.stdcxx-175.cpp (original) +++ stdcxx/branches/4.3.x/tests/regress/21.string.replace.stdcxx-175.cpp Sun Sep 13 22:46:24 2009 @@ -28,17 +28,15 @@ #include #include -int main (int argc, char* argv []) +int main () { std::string s (4095, 'a'); - try - { + try { s.replace (0, 1, "a", s.max_size () + 1); assert (!"Expect length error, got nothing"); } - catch (std::length_error& e) - { + catch (std::length_error&) { } return 0; Modified: stdcxx/branches/4.3.x/tests/regress/21.string.stdcxx-466.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/regress/21.string.stdcxx-466.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/regress/21.string.stdcxx-466.cpp (original) +++ stdcxx/branches/4.3.x/tests/regress/21.string.stdcxx-466.cpp Sun Sep 13 22:46:24 2009 @@ -27,7 +27,7 @@ #include #include -int main (int argc, char* argv[]) +int main () { std::string s ("efgh"); Modified: stdcxx/branches/4.3.x/tests/regress/22.locale.messages.stdcxx-542.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/regress/22.locale.messages.stdcxx-542.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/regress/22.locale.messages.stdcxx-542.cpp (original) +++ stdcxx/branches/4.3.x/tests/regress/22.locale.messages.stdcxx-542.cpp Sun Sep 13 22:46:24 2009 @@ -65,7 +65,7 @@ messagesT::catalog cats [4]; - int i; + std::size_t i; // test STDCXX-508 for (i = 0; i < sizeof (cats) / sizeof (*cats); ++i) { @@ -74,7 +74,7 @@ } // test STDCXX-542 - for (--i; i >= 0; --i) + while (i-- > 0) msgs.close (cats [i]); std::remove (CATALOG CAT_EXT); Modified: stdcxx/branches/4.3.x/tests/regress/23.list.cons.stdcxx-268.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/regress/23.list.cons.stdcxx-268.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/regress/23.list.cons.stdcxx-268.cpp (original) +++ stdcxx/branches/4.3.x/tests/regress/23.list.cons.stdcxx-268.cpp Sun Sep 13 22:46:24 2009 @@ -51,7 +51,8 @@ int ListItem::count_ = 0; -int main(int argc, char* argv[]) + +int main () { typedef std::list List; ListItem items [20]; Modified: stdcxx/branches/4.3.x/tests/regress/23.list.insert.stdcxx-331.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/regress/23.list.insert.stdcxx-331.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/regress/23.list.insert.stdcxx-331.cpp (original) +++ stdcxx/branches/4.3.x/tests/regress/23.list.insert.stdcxx-331.cpp Sun Sep 13 22:46:24 2009 @@ -51,7 +51,8 @@ int ListItem::count_ = 0; -int main (int argc, char* argv[]) + +int main () { typedef std::list List; ListItem items [20]; Modified: stdcxx/branches/4.3.x/tests/regress/23.list.special.stdcxx-334.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/regress/23.list.special.stdcxx-334.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/regress/23.list.special.stdcxx-334.cpp (original) +++ stdcxx/branches/4.3.x/tests/regress/23.list.special.stdcxx-334.cpp Sun Sep 13 22:46:24 2009 @@ -32,17 +32,18 @@ { }; -bool operator == (Alloc a1, Alloc a2) +bool operator== (Alloc, Alloc) { return false; } -bool operator != (Alloc a1, Alloc a2) +bool operator!= (Alloc, Alloc) { return true; } -int main(int argc, char* argv[]) + +int main () { const char src [] = "source string"; const char dst [] = "destination string"; Modified: stdcxx/branches/4.3.x/tests/regress/23.set.stdcxx-216.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/regress/23.set.stdcxx-216.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/regress/23.set.stdcxx-216.cpp (original) +++ stdcxx/branches/4.3.x/tests/regress/23.set.stdcxx-216.cpp Sun Sep 13 22:46:24 2009 @@ -22,7 +22,7 @@ * implied. See the License for the specific language governing * permissions and limitations under the License. * - * Copyright 1994-2008 Rogue Wave Software. + * Copyright 1994-2008 Rogue Wave Software, Inc. * **************************************************************************/ @@ -33,15 +33,15 @@ { static const unsigned magic = 0x12344321; - Value (unsigned value = 0) - : value (value) - , valid (magic) + Value (unsigned val = 0) + : value (val), + valid (magic) { } Value (const Value& key) - : value (key.value) - , valid (key.magic) + : value (key.value), + valid (key.magic) { } @@ -89,17 +89,6 @@ unsigned valid; }; -//#include -// -//void dump (const std::set& s) -//{ -// std::set::const_iterator b = s.begin (); -// std::set::const_iterator e = s.end (); -// -// for (/**/; b != e; ++b) -// std::cout << b->value << ' '; -// std::cout << std::endl; -//} int main () { Modified: stdcxx/branches/4.3.x/tests/regress/23.vector.stdcxx-1037.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/regress/23.vector.stdcxx-1037.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/regress/23.vector.stdcxx-1037.cpp (original) +++ stdcxx/branches/4.3.x/tests/regress/23.vector.stdcxx-1037.cpp Sun Sep 13 22:46:24 2009 @@ -42,7 +42,8 @@ }; template - Alloc (const Alloc& other) : std::allocator (other), i_ (other.i_) { } + Alloc (const Alloc& other) + : std::allocator(other), i_ (other.i_) { } template Alloc& operator= (const Alloc& other) Modified: stdcxx/branches/4.3.x/tests/self/0.fnmatch.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/self/0.fnmatch.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/self/0.fnmatch.cpp (original) +++ stdcxx/branches/4.3.x/tests/self/0.fnmatch.cpp Sun Sep 13 22:46:24 2009 @@ -48,7 +48,7 @@ const int native = exp; #endif // FNMATCH - if (result != native || -1 < exp && result != exp) { + if (result != native || (-1 < exp && result != exp)) { ++nerrors; Modified: stdcxx/branches/4.3.x/tests/src/23.containers.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/src/23.containers.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/src/23.containers.cpp (original) +++ stdcxx/branches/4.3.x/tests/src/23.containers.cpp Sun Sep 13 22:46:24 2009 @@ -298,9 +298,10 @@ RW_ASSERT (0 != tname); if ( 0 == func || is_member - || Ids::arg_cont != argtype && Ids::arg_ccont != argtype) { + || (Ids::arg_cont != argtype && Ids::arg_ccont != argtype)) { // append the name or mnemonic of the argument type - rw_asnprintf (pbuf, pbufsize, "%{+}%{?}_%{:}%{?}, %{;}%{;}%s%s%s", + rw_asnprintf (pbuf, pbufsize, + "%{+}%{?}_%{:}%{?}, %{;}%{;}%s%s%s", 0 == func, 0 < argno, pfx, tname, sfx); } else { Modified: stdcxx/branches/4.3.x/tests/src/char.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/src/char.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/src/char.cpp (original) +++ stdcxx/branches/4.3.x/tests/src/char.cpp Sun Sep 13 22:46:24 2009 @@ -332,21 +332,21 @@ { ++n_calls_ [MemFun::lt]; - return c1.f < c2.f || c1.f == c2.f && c1.c < c2.c; + return c1.f < c2.f || (c1.f == c2.f && c1.c < c2.c); } int UserTraits:: compare (const char_type *s1, const char_type *s2, size_t n) { - RW_ASSERT (0 == n || s1 && s2); + RW_ASSERT (0 == n || (s1 && s2)); ++n_calls_ [MemFun::compare]; for (size_t i = 0; i != n; ++i) { if (s1 [i].f != s2 [i].f || s1 [i].c != s2 [i].c) { if ( s1 [i].f < s2 [i].f - || s1 [i].f == s2 [i].f && s1 [i].c < s2 [i].c) + || (s1 [i].f == s2 [i].f && s1 [i].c < s2 [i].c)) return -1; return 1; @@ -393,7 +393,7 @@ UserTraits:: copy (char_type *dst, const char_type *src, size_t n) { - RW_ASSERT (0 == n || dst && src); + RW_ASSERT (0 == n || (dst && src)); ++n_calls_ [MemFun::copy]; @@ -408,7 +408,7 @@ UserTraits:: move (char_type *dst, const char_type *src, size_t n) { - RW_ASSERT (0 == n || dst && src); + RW_ASSERT (0 == n || (dst && src)); ++n_calls_ [MemFun::move]; Modified: stdcxx/branches/4.3.x/tests/src/cmdopt.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/src/cmdopt.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/src/cmdopt.cpp (original) +++ stdcxx/branches/4.3.x/tests/src/cmdopt.cpp Sun Sep 13 22:46:24 2009 @@ -121,8 +121,8 @@ if (opthelp && *opthelp) { - if ( opt->sopt_ == opthelp [0] && '\0' == opthelp [1] - || *lopt && 0 == strcmp (lopt + 1, opthelp)) { + if ( (opt->sopt_ == opthelp [0] && '\0' == opthelp [1]) + || (*lopt && 0 == strcmp (lopt + 1, opthelp))) { // remember that we found the option whose (short // or long) name we're to give help on; after printing @@ -374,7 +374,7 @@ if ( '*' == *next || '+' == *next - || val < 0 && '-' == *next + || (val < 0 && '-' == *next) || isdigit (*next)) { end = 0; @@ -991,11 +991,11 @@ // try to match the long option first, and only if it // doesn't match try the short single-character option - if ( cmplen == strlen (lopt) - && 0 == memcmp (optname, lopt, cmplen) - || opt->sopt_ - && optname [0] == opt->sopt_ - && (1 == optlen || opt->arg_)) { + if ( ( cmplen == strlen (lopt) + && 0 == memcmp (optname, lopt, cmplen)) + || ( opt->sopt_ + && optname [0] == opt->sopt_ + && (1 == optlen || opt->arg_))) { // matching option has been found found = true; Modified: stdcxx/branches/4.3.x/tests/src/locale.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/src/locale.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/src/locale.cpp (original) +++ stdcxx/branches/4.3.x/tests/src/locale.cpp Sun Sep 13 22:46:24 2009 @@ -676,7 +676,7 @@ const wchar_t wc = wchar_t (i); const int len = wctomb (tmp, wc); - if (nbytes == 0 && 0 < len || nbytes != 0 && nbytes == len) { + if ((nbytes == 0 && 0 < len) || (nbytes != 0 && nbytes == len)) { // if the requested length is 0 (i.e., the caller doesn't // care) and the character is valid, store it // if the requested length is non-zero (including -1), @@ -706,7 +706,7 @@ const int len = wctomb (tmp, wc); - if (nbytes == 0 && 0 < len || nbytes != 0 && nbytes == len) { + if ((nbytes == 0 && 0 < len) || (nbytes != 0 && nbytes == len)) { wbuf [nchars++] = wc; if (nchars == bufsize) return nchars; Modified: stdcxx/branches/4.3.x/tests/src/opt_lines.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/src/opt_lines.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/src/opt_lines.cpp (original) +++ stdcxx/branches/4.3.x/tests/src/opt_lines.cpp Sun Sep 13 22:46:24 2009 @@ -130,7 +130,7 @@ // skip any trailing whitespace for ( ; ' ' == *end; ++end); - if (end == parg || '-' != *end && ',' != *end && '\0' != *end) { + if (end == parg || ('-' != *end && ',' != *end && '\0' != *end)) { fprintf (stderr, "invalid character '%c' at position %d: \"%s\"\n", *end, int (parg - argbeg), argv [0]); Modified: stdcxx/branches/4.3.x/tests/src/opt_trace.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/src/opt_trace.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/src/opt_trace.cpp (original) +++ stdcxx/branches/4.3.x/tests/src/opt_trace.cpp Sun Sep 13 22:46:24 2009 @@ -115,7 +115,7 @@ // skip any trailing whitespace for ( ; ' ' == *end; ++end); - if (end == parg || '-' != *end && ',' != *end && '\0' != *end) { + if (end == parg || ('-' != *end && ',' != *end && '\0' != *end)) { fprintf (stderr, "invalid character '%c' at position %d: \"%s\"\n", *end, int (parg - argbeg), argv [0]); Modified: stdcxx/branches/4.3.x/tests/src/printf.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/src/printf.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/src/printf.cpp (original) +++ stdcxx/branches/4.3.x/tests/src/printf.cpp Sun Sep 13 22:46:24 2009 @@ -2232,7 +2232,7 @@ len += n; - if (i + 1 == argc || _RWSTD_SIZE_MAX == argc && 0 == argv [i + 1]) + if (i + 1 == argc || (_RWSTD_SIZE_MAX == argc && 0 == argv [i + 1])) break; const unsigned pound = spec.fl_pound; @@ -2845,8 +2845,9 @@ break; case 'S': // %{S}, %{lS}, %{#*S} - if ( spec.mod == spec.mod_l || spec.mod == FmtSpec::mod_none - && spec.fl_pound && sizeof (wchar_t) == spec.width) { + if ( spec.mod == spec.mod_l + || ( spec.mod == FmtSpec::mod_none + && spec.fl_pound && sizeof (wchar_t) == spec.width)) { // std::wstring spec.param.ptr_ = PARAM (ptr_, pva); @@ -3269,7 +3270,7 @@ // verify that the length of the fomatted buffer is less than // its size (this test is unreliable if there are any embedded // NULs in the output) - RW_ASSERT (nchars < 0 || buf && strlen (buf) < bufsize); + RW_ASSERT (nchars < 0 || (buf && strlen (buf) < bufsize)); _RWSTD_UNUSED (nchars); Modified: stdcxx/branches/4.3.x/tests/strings/21.string.compare.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/strings/21.string.compare.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/strings/21.string.compare.cpp (original) +++ stdcxx/branches/4.3.x/tests/strings/21.string.compare.cpp Sun Sep 13 22:46:24 2009 @@ -800,9 +800,9 @@ } // verify the returned value - const bool success = res < 0 && tcase.nres == NPOS - || res > 0 && tcase.nres > 0 - || res == 0 && tcase.nres == 0; + const bool success = (res < 0 && tcase.nres == NPOS) + || (res > 0 && tcase.nres > 0) + || (res == 0 && tcase.nres == 0); rw_assert (success, 0, tcase.line, "line %d. %{$FUNCALL} == %d, got %d", Modified: stdcxx/branches/4.3.x/tests/strings/21.string.io.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/strings/21.string.io.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/strings/21.string.io.cpp (original) +++ stdcxx/branches/4.3.x/tests/strings/21.string.io.cpp Sun Sep 13 22:46:24 2009 @@ -1141,8 +1141,8 @@ func.which_ == StringIds::getline_istream_str || func.which_ == StringIds::getline_istream_str_val #ifndef _RWSTD_NO_EXT_KEEP_WIDTH_ON_FAILURE - || func.which_ == StringIds::inserter_ostream_cstr - && ret_state != Good + || ( func.which_ == StringIds::inserter_ostream_cstr + && ret_state != Good) #endif // _RWSTD_NO_EXT_KEEP_WIDTH_ON_FAILURE ? tcase.off : tcase.val; Modified: stdcxx/branches/4.3.x/tests/support/18.numeric.special.float.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/support/18.numeric.special.float.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/support/18.numeric.special.float.cpp (original) +++ stdcxx/branches/4.3.x/tests/support/18.numeric.special.float.cpp Sun Sep 13 22:46:24 2009 @@ -1259,8 +1259,8 @@ _RWSTD_UNUSED (pf); \ /* verify value */ \ rw_assert ( FLim::member () == FVal::member () \ - || FLim::member () != FLim::member () \ - && FVal::member () != FVal::member (), \ + || ( FLim::member () != FLim::member () \ + && FVal::member () != FVal::member ()), \ 0, __LINE__, \ "numeric_limits<%s>::" #member "() == %{@}, got %{@}", \ tname, fmt, FVal::member (), fmt, FLim::member ()); \ Modified: stdcxx/branches/4.3.x/util/collate.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/util/collate.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/util/collate.cpp (original) +++ stdcxx/branches/4.3.x/util/collate.cpp Sun Sep 13 22:46:24 2009 @@ -151,8 +151,8 @@ std::string second = ord_it->name.substr (comma_pos + 1); // verify a valid weight ordering - if ((first == "forward" && second != "position") || - first == "backward" && second != "position") { + if ( (first == "forward" && second != "position") + || (first == "backward" && second != "position")) { issue_diag (E_COLORD, true, &*ord_it, "unrecognized collating order\n"); break; Modified: stdcxx/branches/4.3.x/util/exec.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/util/exec.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/util/exec.cpp (original) +++ stdcxx/branches/4.3.x/util/exec.cpp Sun Sep 13 22:46:24 2009 @@ -550,8 +550,9 @@ else if (WIFCONTINUED (status)) stopped = 0; #endif - else - ; /* huh? */ + else { + /* huh? */ + } } else if ((pid_t)-1 == wait_pid) { if (EINTR == errno && alarm_timeout) { @@ -619,8 +620,9 @@ if (waitopts) /* bad waitpid options, reset to 0 and try again */ waitopts = 0; - else - ; /* Now what? */ + else { + /* Now what? */ + } } else if (ECHILD == errno) { /* should not happen */ Modified: stdcxx/branches/4.3.x/util/locale.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/util/locale.cpp?rev=814418&r1=814417&r2=814418&view=diff ============================================================================== --- stdcxx/branches/4.3.x/util/locale.cpp (original) +++ stdcxx/branches/4.3.x/util/locale.cpp Sun Sep 13 22:46:24 2009 @@ -865,8 +865,6 @@ if (n_cmap2_it != cmap->get_mb_cmap().end()) std::cout << cmap->get_rw_cmap().find( n_cmap2_it->second)->second; - else - ; } else { for (unsigned int j = 0; j < idx; j++) {