From: Benjamin Kosnik Date: Wed, 14 May 2008 13:12:02 +0000 (+0000) Subject: sstream: Adjust braces. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d9cdfe6a7f8c14ddd9f68399f6cf7bc93d3a2b32;p=gcc.git sstream: Adjust braces. 2008-05-14 Benjamin Kosnik * include/std/sstream: Adjust braces. * include/bits/fstream.tcc: Same. * testsuite/29_atomics/atomic_flag/test_and_set/explicit.c: Add -shared-libgcc. * testsuite/29_atomics/atomic_flag/test_and_set/implicit.c: Same. * doc/doxygen/user.cfg.in: Remove thread include. From-SVN: r135291 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 1b2e4fa7257..bb4e3d62ec9 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,13 @@ +2008-05-14 Benjamin Kosnik + + * include/std/sstream: Adjust braces. + * include/bits/fstream.tcc: Same. + * testsuite/29_atomics/atomic_flag/test_and_set/explicit.c: Add + -shared-libgcc. + * testsuite/29_atomics/atomic_flag/test_and_set/implicit.c: Same. + + * doc/doxygen/user.cfg.in: Remove thread include. + 2008-05-13 David Daney * config/cpu/mips/atomicity.h: Remove file. diff --git a/libstdc++-v3/doc/doxygen/user.cfg.in b/libstdc++-v3/doc/doxygen/user.cfg.in index fdb1ea1e5f8..3c59dcbb831 100644 --- a/libstdc++-v3/doc/doxygen/user.cfg.in +++ b/libstdc++-v3/doc/doxygen/user.cfg.in @@ -497,7 +497,6 @@ INPUT = @srcdir@/libsupc++/cxxabi.h \ include/streambuf \ include/string \ include/system_error \ - include/thread \ include/tuple \ include/type_traits \ include/unordered_map \ diff --git a/libstdc++-v3/include/bits/fstream.tcc b/libstdc++-v3/include/bits/fstream.tcc index 1ef7af50e44..69119dc6853 100644 --- a/libstdc++-v3/include/bits/fstream.tcc +++ b/libstdc++-v3/include/bits/fstream.tcc @@ -662,21 +662,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std) setbuf(char_type* __s, streamsize __n) { if (!this->is_open()) - if (__s == 0 && __n == 0) - _M_buf_size = 1; - else if (__s && __n > 0) - { - // This is implementation-defined behavior, and assumes that - // an external char_type array of length __n exists and has - // been pre-allocated. If this is not the case, things will - // quickly blow up. When __n > 1, __n - 1 positions will be - // used for the get area, __n - 1 for the put area and 1 - // position to host the overflow char of a full put area. - // When __n == 1, 1 position will be used for the get area - // and 0 for the put area, as in the unbuffered case above. - _M_buf = __s; - _M_buf_size = __n; - } + { + if (__s == 0 && __n == 0) + _M_buf_size = 1; + else if (__s && __n > 0) + { + // This is implementation-defined behavior, and assumes that + // an external char_type array of length __n exists and has + // been pre-allocated. If this is not the case, things will + // quickly blow up. When __n > 1, __n - 1 positions will be + // used for the get area, __n - 1 for the put area and 1 + // position to host the overflow char of a full put area. + // When __n == 1, 1 position will be used for the get area + // and 0 for the put area, as in the unbuffered case above. + _M_buf = __s; + _M_buf_size = __n; + } + } return this; } diff --git a/libstdc++-v3/include/std/sstream b/libstdc++-v3/include/std/sstream index f8dd50a19f9..2a812423e8d 100644 --- a/libstdc++-v3/include/std/sstream +++ b/libstdc++-v3/include/std/sstream @@ -236,10 +236,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { const bool __testin = _M_mode & ios_base::in; if (this->pptr() && this->pptr() > this->egptr()) - if (__testin) - this->setg(this->eback(), this->gptr(), this->pptr()); - else - this->setg(this->pptr(), this->pptr(), this->pptr()); + { + if (__testin) + this->setg(this->eback(), this->gptr(), this->pptr()); + else + this->setg(this->pptr(), this->pptr(), this->pptr()); + } } }; diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit.c b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit.c index 9401af4d13b..12a503cbf90 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit.c +++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit.c @@ -1,4 +1,4 @@ -// { dg-options "-x c -lstdc++" } +// { dg-options "-x c -shared-libgcc -lstdc++" } // Copyright (C) 2008 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/implicit.c b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/implicit.c index 727421bd12f..658c2b7fc2f 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/implicit.c +++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/implicit.c @@ -1,4 +1,4 @@ -// { dg-options "-x c -lstdc++" } +// { dg-options "-x c -shared-libgcc -lstdc++" } // Copyright (C) 2008 Free Software Foundation, Inc. //