From owner-svn-src-stable@FreeBSD.ORG Thu Dec 12 16:18:46 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE8CB2B3; Thu, 12 Dec 2013 16:18:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 98A151FD8; Thu, 12 Dec 2013 16:18:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBCGIkMP078952; Thu, 12 Dec 2013 16:18:46 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBCGIjhs078943; Thu, 12 Dec 2013 16:18:45 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312121618.rBCGIjhs078943@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 12 Dec 2013 16:18:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r259263 - in stable/8/contrib/libstdc++: include/debug include/ext libsupc++ src X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 16:18:46 -0000 Author: pfg Date: Thu Dec 12 16:18:45 2013 New Revision: 259263 URL: http://svnweb.freebsd.org/changeset/base/259263 Log: MFC r241959: Fix a number of other clang warnings in libstdc++, which could appear when building other C++ software with it. Also fix one actual bug in libsupc++, which was exposed by such a warning. This latter fix is the only functional change. This is required for newer versions of gcc and clang which have stricter warnings about parenthesis in C++ programs. Modified: stable/8/contrib/libstdc++/include/debug/safe_iterator.tcc stable/8/contrib/libstdc++/include/ext/ropeimpl.h stable/8/contrib/libstdc++/libsupc++/tinfo.cc stable/8/contrib/libstdc++/src/locale.cc stable/8/contrib/libstdc++/src/strstream.cc stable/8/contrib/libstdc++/src/tree.cc Directory Properties: stable/8/ (props changed) stable/8/contrib/ (props changed) stable/8/contrib/libstdc++/ (props changed) Modified: stable/8/contrib/libstdc++/include/debug/safe_iterator.tcc ============================================================================== --- stable/8/contrib/libstdc++/include/debug/safe_iterator.tcc Thu Dec 12 15:04:59 2013 (r259262) +++ stable/8/contrib/libstdc++/include/debug/safe_iterator.tcc Thu Dec 12 16:18:45 2013 (r259263) @@ -54,8 +54,8 @@ namespace __gnu_debug static_cast(_M_sequence)->begin(); std::pair __dist = this->_M_get_distance(__begin, *this); - bool __ok = (__dist.second == __dp_exact && __dist.first >= -__n - || __dist.second != __dp_exact && __dist.first > 0); + bool __ok = ((__dist.second == __dp_exact && __dist.first >= -__n) + || (__dist.second != __dp_exact && __dist.first > 0)); return __ok; } else @@ -64,8 +64,8 @@ namespace __gnu_debug static_cast(_M_sequence)->end(); std::pair __dist = this->_M_get_distance(*this, __end); - bool __ok = (__dist.second == __dp_exact && __dist.first >= __n - || __dist.second != __dp_exact && __dist.first > 0); + bool __ok = ((__dist.second == __dp_exact && __dist.first >= __n) + || (__dist.second != __dp_exact && __dist.first > 0)); return __ok; } } Modified: stable/8/contrib/libstdc++/include/ext/ropeimpl.h ============================================================================== --- stable/8/contrib/libstdc++/include/ext/ropeimpl.h Thu Dec 12 15:04:59 2013 (r259262) +++ stable/8/contrib/libstdc++/include/ext/ropeimpl.h Thu Dec 12 16:18:45 2013 (r259263) @@ -1143,7 +1143,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } else { - char* __kind; + const char* __kind; switch (__r->_M_tag) { Modified: stable/8/contrib/libstdc++/libsupc++/tinfo.cc ============================================================================== --- stable/8/contrib/libstdc++/libsupc++/tinfo.cc Thu Dec 12 15:04:59 2013 (r259262) +++ stable/8/contrib/libstdc++/libsupc++/tinfo.cc Thu Dec 12 16:18:45 2013 (r259263) @@ -499,9 +499,9 @@ __do_dyncast (ptrdiff_t src2dst, result.whole2dst = __sub_kind (result.whole2dst | result2.whole2dst); } - else if ((result.dst_ptr != 0 & result2.dst_ptr != 0) - || (result.dst_ptr != 0 & result2_ambig) - || (result2.dst_ptr != 0 & result_ambig)) + else if ((result.dst_ptr != 0 && result2.dst_ptr != 0) + || (result.dst_ptr != 0 && result2_ambig) + || (result2.dst_ptr != 0 && result_ambig)) { // Found two different DST_TYPE bases, or a valid one and a set of // ambiguous ones, must disambiguate. See whether SRC_PTR is Modified: stable/8/contrib/libstdc++/src/locale.cc ============================================================================== --- stable/8/contrib/libstdc++/src/locale.cc Thu Dec 12 15:04:59 2013 (r259262) +++ stable/8/contrib/libstdc++/src/locale.cc Thu Dec 12 16:18:45 2013 (r259263) @@ -146,7 +146,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) locale::_S_normalize_category(category __cat) { int __ret = 0; - if (__cat == none || (__cat & all) && !(__cat & ~all)) + if (__cat == none || ((__cat & all) && !(__cat & ~all))) __ret = __cat; else { Modified: stable/8/contrib/libstdc++/src/strstream.cc ============================================================================== --- stable/8/contrib/libstdc++/src/strstream.cc Thu Dec 12 15:04:59 2013 (r259262) +++ stable/8/contrib/libstdc++/src/strstream.cc Thu Dec 12 16:18:45 2013 (r259263) @@ -311,10 +311,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) strstreambuf::_M_free(char* p) { if (p) - if (_M_free_fun) - _M_free_fun(p); - else - delete[] p; + { + if (_M_free_fun) + _M_free_fun(p); + else + delete[] p; + } } void Modified: stable/8/contrib/libstdc++/src/tree.cc ============================================================================== --- stable/8/contrib/libstdc++/src/tree.cc Thu Dec 12 15:04:59 2013 (r259262) +++ stable/8/contrib/libstdc++/src/tree.cc Thu Dec 12 16:18:45 2013 (r259263) @@ -316,17 +316,21 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __z->_M_parent->_M_right = __x; if (__leftmost == __z) - if (__z->_M_right == 0) // __z->_M_left must be null also - __leftmost = __z->_M_parent; - // makes __leftmost == _M_header if __z == __root - else - __leftmost = _Rb_tree_node_base::_S_minimum(__x); + { + if (__z->_M_right == 0) // __z->_M_left must be null also + __leftmost = __z->_M_parent; + // makes __leftmost == _M_header if __z == __root + else + __leftmost = _Rb_tree_node_base::_S_minimum(__x); + } if (__rightmost == __z) - if (__z->_M_left == 0) // __z->_M_right must be null also - __rightmost = __z->_M_parent; - // makes __rightmost == _M_header if __z == __root - else // __x == __z->_M_left - __rightmost = _Rb_tree_node_base::_S_maximum(__x); + { + if (__z->_M_left == 0) // __z->_M_right must be null also + __rightmost = __z->_M_parent; + // makes __rightmost == _M_header if __z == __root + else // __x == __z->_M_left + __rightmost = _Rb_tree_node_base::_S_maximum(__x); + } } if (__y->_M_color != _S_red) {