From patchwork Thu Apr 28 08:26:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 616064 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qwVLR1RJ7z9t5w for ; Thu, 28 Apr 2016 18:27:06 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=BxCp9abO; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=g7YmTfpUYJ2kGQQepV 5WLsuP22kJ0SJo0TAYxzR5pCiTGx27f8hXaBcT/KzHpo8AYKFS8F6Sve5+L0n6d1 h5skosJbvBLBd3nE4SFyegDZJU4pANMb77mCTHdhPsTNDYlY8Lh3XK9/fHxE+cLj lVytlx9a4e4SaZAYyYCTQQ+s0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=KLygPuosEPDz/Aw/udIAbLsj W1U=; b=BxCp9abONfOv9h9unGW8Ra9boPlAZv2ZFLu1mJR5osyOm6j1tf7jn4AV OtdGUqpPBbejRRiMwPLSImcYOjohwJ1+p3ngiaffASFcR/LW+2L4rCcE8frYsCIS UOLAw0SaVoRayro7maLOkyNwKicIkJxAKPSqbc58lXQfpQTy0/o= Received: (qmail 38878 invoked by alias); 28 Apr 2016 08:26:55 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 38851 invoked by uid 89); 28 Apr 2016 08:26:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=4.0 required=5.0 tests=AWL, BAYES_99, BAYES_999, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=no version=3.3.2 spammy=jst, JST, 1897, Fill X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-yw0-f169.google.com Received: from mail-yw0-f169.google.com (HELO mail-yw0-f169.google.com) (209.85.161.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 28 Apr 2016 08:26:42 +0000 Received: by mail-yw0-f169.google.com with SMTP id g133so100476927ywb.2; Thu, 28 Apr 2016 01:26:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=F+CndntzWa2lSNDR/y8xjgz6tzsiIuTljXIDwo3W9BY=; b=MnBI1sdHZru2hP6+xd33+RrY5lzKSEWwYX+mgdynCMPdWwpkz8jLRD09fm9YDC/8e4 glvVkZkSg8eUqg/bR75fx1wu5tVmpUie9GQkJkSRXDhNeJH5gF5ywdKpVFedG/QcATJ2 1bhCWMrwP0k0aYnxLUs9V9ONv5rnV8VXNp0kMTBePyEjAw3eMglKh4bztvaWI7Wd0JnV yiG6gpEh/RuXIl2/KYYvYFV2n7vRGFWf02Sn3IPAJMmvZ4vKLzWAl67+NJLPq+ATK8JD DN51bwU2JDfzYUe8QH+AbBmwOGM7GbGP5VV+nAk6HcUsVf4B2iDl59hunGAMzuxzKQZv kfYw== X-Gm-Message-State: AOPr4FXcfHjQgOCT0uzRnPn4iIVDkz6sKM05jUhfKKluEcVtV3PiPkJcHehKPQJAiJC14VP1oe1avt+VrsYCmQ== MIME-Version: 1.0 X-Received: by 10.37.6.139 with SMTP id 133mr6694863ybg.46.1461832000308; Thu, 28 Apr 2016 01:26:40 -0700 (PDT) Received: by 10.37.215.137 with HTTP; Thu, 28 Apr 2016 01:26:40 -0700 (PDT) In-Reply-To: References: Date: Thu, 28 Apr 2016 09:26:40 +0100 Message-ID: Subject: Re: [patch] Remove trailing whitespaces From: Jonathan Wakely To: Chris Gregory Cc: "libstdc++" , gcc-patches On 28 April 2016 at 05:14, Chris Gregory wrote: > This doesn't break any of the code. > > I made sure that this didn't affect any string literals or character literals. > > Cheers, > > Chris Gregory! Thanks, I'll double check it and apply it (there's no need for a copyright assignment for this as it's a mechanical change). N.B. all patches should be CC'd to the gcc-patches list as well. Index: libstdc++-v3/src/Makefile.am =================================================================== diff --git a/trunk/libstdc++-v3/src/Makefile.am b/trunk/libstdc++-v3/src/Makefile.am --- a/trunk/libstdc++-v3/src/Makefile.am (revision 235544) +++ b/trunk/libstdc++-v3/src/Makefile.am (working copy) @@ -77,7 +77,7 @@ cxx98_sources = \ compatibility.cc \ compatibility-debug_list.cc \ compatibility-debug_list-2.cc \ - ${ldbl_compat_sources} + ${ldbl_compat_sources} cxx11_sources = \ compatibility-c++0x.cc \ @@ -141,7 +141,7 @@ compatibility-condvar.o: compatibility-condvar.cc $(CXXCOMPILE) -std=gnu++11 -c $< # A note on compatibility and static libraries. -# +# # static lib == linked against only this version, should not need compat # shared lib == linked against potentially all compat versions # @@ -150,7 +150,7 @@ compatibility-condvar.o: compatibility-condvar.cc # # In the sub-directories of libsupc++, src/c++98, src/c++11, only # -prefer-pic objects are generated for the convenience libraries. -# +# # In the main src directory, make shared and static objects just for # the compat libraries. Shared objects are compiled with -prefer-pic # -D_GLIBCXX_SHARED and in the .libs sub-directory, static objects are @@ -187,7 +187,7 @@ AM_CXXFLAGS = \ # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to # attempt to infer which configuration to use. -# +# # The second tag argument, `--tag disable-shared` means that libtool # only compiles each source once, for static objects. In actuality, # glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to Index: libstdc++-v3/src/Makefile.in =================================================================== diff --git a/trunk/libstdc++-v3/src/Makefile.in b/trunk/libstdc++-v3/src/Makefile.in --- a/trunk/libstdc++-v3/src/Makefile.in (revision 235544) +++ b/trunk/libstdc++-v3/src/Makefile.in (working copy) @@ -358,9 +358,9 @@ PWD_COMMAND = $${PWDCMD-pwd} STAMP = echo timestamp > toolexecdir = $(glibcxx_toolexecdir) toolexeclibdir = $(glibcxx_toolexeclibdir) -@ENABLE_WERROR_FALSE@WERROR_FLAG = +@ENABLE_WERROR_FALSE@WERROR_FLAG = @ENABLE_WERROR_TRUE@WERROR_FLAG = $(WERROR) -@ENABLE_EXTERN_TEMPLATE_FALSE@XTEMPLATE_FLAGS = +@ENABLE_EXTERN_TEMPLATE_FALSE@XTEMPLATE_FLAGS = @ENABLE_EXTERN_TEMPLATE_TRUE@XTEMPLATE_FLAGS = -fno-implicit-templates # These bits are all figured out from configure. Look in acinclude.m4 @@ -369,12 +369,12 @@ CONFIG_CXXFLAGS = \ $(SECTION_FLAGS) $(HWCAP_FLAGS) -frandom-seed=$@ WARN_CXXFLAGS = \ - $(WARN_FLAGS) $(WERROR_FLAG) -fdiagnostics-show-location=once + $(WARN_FLAGS) $(WERROR_FLAG) -fdiagnostics-show-location=once # -I/-D flags to pass when compiling. AM_CPPFLAGS = $(GLIBCXX_INCLUDES) $(CPPFLAGS) -@ENABLE_FILESYSTEM_TS_FALSE@filesystem_dir = +@ENABLE_FILESYSTEM_TS_FALSE@filesystem_dir = @ENABLE_FILESYSTEM_TS_TRUE@filesystem_dir = filesystem SUBDIRS = c++98 c++11 $(filesystem_dir) @VTV_CYGMIN_FALSE@toolexeclib_LTLIBRARIES = libstdc++.la @@ -393,7 +393,7 @@ SUBDIRS = c++98 c++11 $(filesystem_dir) @VTV_CYGMIN_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(libvtv_la_AM_CXXFLAGS) \ @VTV_CYGMIN_TRUE@ $(CXXFLAGS) $(libvtv_la_LDFLAGS) $(LDFLAGS) -o $@ -@GLIBCXX_LDBL_COMPAT_FALSE@ldbl_compat_sources = +@GLIBCXX_LDBL_COMPAT_FALSE@ldbl_compat_sources = @GLIBCXX_LDBL_COMPAT_TRUE@ldbl_compat_sources = compatibility-ldbl.cc parallel_compat_sources = \ compatibility-parallel_list.cc compatibility-parallel_list-2.cc @@ -402,7 +402,7 @@ cxx98_sources = \ compatibility.cc \ compatibility-debug_list.cc \ compatibility-debug_list-2.cc \ - ${ldbl_compat_sources} + ${ldbl_compat_sources} cxx11_sources = \ compatibility-c++0x.cc \ @@ -430,7 +430,7 @@ libstdc___la_LDFLAGS = \ libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) # A note on compatibility and static libraries. -# +# # static lib == linked against only this version, should not need compat # shared lib == linked against potentially all compat versions # @@ -439,7 +439,7 @@ libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFL # # In the sub-directories of libsupc++, src/c++98, src/c++11, only # -prefer-pic objects are generated for the convenience libraries. -# +# # In the main src directory, make shared and static objects just for # the compat libraries. Shared objects are compiled with -prefer-pic # -D_GLIBCXX_SHARED and in the .libs sub-directory, static objects are @@ -477,7 +477,7 @@ AM_CXXFLAGS = \ # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to # attempt to infer which configuration to use. -# +# # The second tag argument, `--tag disable-shared` means that libtool # only compiles each source once, for static objects. In actuality, # glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to @@ -512,24 +512,24 @@ CXXLINK = \ @ENABLE_SYMVERS_TRUE@CLEANFILES = libstdc++-symbols.ver $(version_dep) @ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@version_arg = -Wl,-exported_symbols_list,libstdc++-symbols.explist -@ENABLE_SYMVERS_FALSE@version_arg = +@ENABLE_SYMVERS_FALSE@version_arg = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@@ENABLE_SYMVERS_TRUE@version_arg = -Wl,--version-script=libstdc++-symbols.ver @ENABLE_SYMVERS_GNU_TRUE@@ENABLE_SYMVERS_TRUE@version_arg = -Wl,--version-script=libstdc++-symbols.ver @ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@version_arg = -Wl,-M,libstdc++-symbols.ver-sun @ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.explist -@ENABLE_SYMVERS_FALSE@version_dep = +@ENABLE_SYMVERS_FALSE@version_dep = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver @ENABLE_SYMVERS_GNU_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver @ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver-sun -@GLIBCXX_BUILD_DEBUG_FALSE@STAMP_DEBUG = +@GLIBCXX_BUILD_DEBUG_FALSE@STAMP_DEBUG = # Added rules. # 1 debug library # 2 supra-convenience library @GLIBCXX_BUILD_DEBUG_TRUE@STAMP_DEBUG = build-debug -@GLIBCXX_BUILD_DEBUG_FALSE@STAMP_INSTALL_DEBUG = +@GLIBCXX_BUILD_DEBUG_FALSE@STAMP_INSTALL_DEBUG = @GLIBCXX_BUILD_DEBUG_TRUE@STAMP_INSTALL_DEBUG = install-debug -@GLIBCXX_BUILD_DEBUG_FALSE@CLEAN_DEBUG = +@GLIBCXX_BUILD_DEBUG_FALSE@CLEAN_DEBUG = @GLIBCXX_BUILD_DEBUG_TRUE@CLEAN_DEBUG = debug # Build a debug variant. @@ -602,9 +602,9 @@ clean-toolexeclibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libstdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES) $(EXTRA_libstdc___la_DEPENDENCIES) +libstdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES) $(EXTRA_libstdc___la_DEPENDENCIES) $(libstdc___la_LINK) $(am_libstdc___la_rpath) $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) $(LIBS) -libvtv.la: $(libvtv_la_OBJECTS) $(libvtv_la_DEPENDENCIES) $(EXTRA_libvtv_la_DEPENDENCIES) +libvtv.la: $(libvtv_la_OBJECTS) $(libvtv_la_DEPENDENCIES) $(EXTRA_libvtv_la_DEPENDENCIES) $(libvtv_la_LINK) $(am_libvtv_la_rpath) $(libvtv_la_OBJECTS) $(libvtv_la_LIBADD) $(LIBS) mostlyclean-compile: Index: libstdc++-v3/src/c++11/Makefile.am =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/Makefile.am b/trunk/libstdc++-v3/src/c++11/Makefile.am --- a/trunk/libstdc++-v3/src/c++11/Makefile.am (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/Makefile.am (working copy) @@ -115,7 +115,7 @@ vpath % $(top_srcdir)/src/c++11 libc__11convenience_la_SOURCES = $(sources) $(inst_sources) # Use special rules for the hashtable.cc file so that all -# the generated template functions are also instantiated. +# the generated template functions are also instantiated. hashtable_c++0x.lo: hashtable_c++0x.cc $(LTCXXCOMPILE) -fimplicit-templates -c $< hashtable_c++0x.o: hashtable_c++0x.cc @@ -149,7 +149,7 @@ AM_MAKEFLAGS = \ # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to # attempt to infer which configuration to use. -# +# # The second tag argument, `--tag disable-shared` means that libtool # only compiles each source once, for static objects. In actuality, # glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to Index: libstdc++-v3/src/c++11/Makefile.in =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/Makefile.in b/trunk/libstdc++-v3/src/c++11/Makefile.in --- a/trunk/libstdc++-v3/src/c++11/Makefile.in (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/Makefile.in (working copy) @@ -328,9 +328,9 @@ PWD_COMMAND = $${PWDCMD-pwd} STAMP = echo timestamp > toolexecdir = $(glibcxx_toolexecdir) toolexeclibdir = $(glibcxx_toolexeclibdir) -@ENABLE_WERROR_FALSE@WERROR_FLAG = +@ENABLE_WERROR_FALSE@WERROR_FLAG = @ENABLE_WERROR_TRUE@WERROR_FLAG = $(WERROR) -@ENABLE_EXTERN_TEMPLATE_FALSE@XTEMPLATE_FLAGS = +@ENABLE_EXTERN_TEMPLATE_FALSE@XTEMPLATE_FLAGS = @ENABLE_EXTERN_TEMPLATE_TRUE@XTEMPLATE_FLAGS = -fno-implicit-templates # These bits are all figured out from configure. Look in acinclude.m4 @@ -339,7 +339,7 @@ CONFIG_CXXFLAGS = \ $(SECTION_FLAGS) $(HWCAP_FLAGS) -frandom-seed=$@ WARN_CXXFLAGS = \ - $(WARN_FLAGS) $(WERROR_FLAG) -fdiagnostics-show-location=once + $(WARN_FLAGS) $(WERROR_FLAG) -fdiagnostics-show-location=once # -I/-D flags to pass when compiling. @@ -347,7 +347,7 @@ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) $(CPPFLAGS) # Convenience library for C++11 runtime. noinst_LTLIBRARIES = libc++11convenience.la -headers = +headers = # Source files linked in via configuration/make substitution for a # particular host. @@ -355,7 +355,7 @@ host_sources = \ ctype_configure_char.cc \ ctype_members.cc -@ENABLE_DUAL_ABI_FALSE@cxx11_abi_sources = +@ENABLE_DUAL_ABI_FALSE@cxx11_abi_sources = @ENABLE_DUAL_ABI_TRUE@cxx11_abi_sources = \ @ENABLE_DUAL_ABI_TRUE@ cow-locale_init.cc \ @ENABLE_DUAL_ABI_TRUE@ cow-shim_facets.cc \ @@ -390,7 +390,7 @@ sources = \ ${cxx11_abi_sources} \ ${host_sources} -@ENABLE_DUAL_ABI_FALSE@extra_string_inst_sources = +@ENABLE_DUAL_ABI_FALSE@extra_string_inst_sources = @ENABLE_DUAL_ABI_TRUE@extra_string_inst_sources = \ @ENABLE_DUAL_ABI_TRUE@ cow-fstream-inst.cc \ @ENABLE_DUAL_ABI_TRUE@ cow-sstream-inst.cc \ @@ -400,7 +400,7 @@ sources = \ @ENABLE_DUAL_ABI_TRUE@ cxx11-wlocale-inst.cc # XTEMPLATE_FLAGS = -@ENABLE_EXTERN_TEMPLATE_FALSE@inst_sources = +@ENABLE_EXTERN_TEMPLATE_FALSE@inst_sources = # XTEMPLATE_FLAGS = -fno-implicit-templates @ENABLE_EXTERN_TEMPLATE_TRUE@inst_sources = \ @@ -449,7 +449,7 @@ AM_MAKEFLAGS = \ # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to # attempt to infer which configuration to use. -# +# # The second tag argument, `--tag disable-shared` means that libtool # only compiles each source once, for static objects. In actuality, # glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to @@ -526,7 +526,7 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libc++11convenience.la: $(libc__11convenience_la_OBJECTS) $(libc__11convenience_la_DEPENDENCIES) $(EXTRA_libc__11convenience_la_DEPENDENCIES) +libc++11convenience.la: $(libc__11convenience_la_OBJECTS) $(libc__11convenience_la_DEPENDENCIES) $(EXTRA_libc__11convenience_la_DEPENDENCIES) $(CXXLINK) $(libc__11convenience_la_OBJECTS) $(libc__11convenience_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -729,7 +729,7 @@ ctype_members.cc: ${glibcxx_srcdir}/$(CCTYPE_CC) vpath % $(top_srcdir)/src/c++11 # Use special rules for the hashtable.cc file so that all -# the generated template functions are also instantiated. +# the generated template functions are also instantiated. hashtable_c++0x.lo: hashtable_c++0x.cc $(LTCXXCOMPILE) -fimplicit-templates -c $< hashtable_c++0x.o: hashtable_c++0x.cc Index: libstdc++-v3/src/c++11/chrono.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/chrono.cc b/trunk/libstdc++-v3/src/c++11/chrono.cc --- a/trunk/libstdc++-v3/src/c++11/chrono.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/chrono.cc (working copy) @@ -75,7 +75,7 @@ namespace std _GLIBCXX_VISIBILITY(default) #endif } - + constexpr bool steady_clock::is_steady; steady_clock::time_point Index: libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc b/trunk/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc --- a/trunk/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc (working copy) @@ -64,7 +64,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { bool test_and_set(memory_order) noexcept; - + void clear(memory_order) noexcept; }; Index: libstdc++-v3/src/c++11/compatibility-c++0x.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/compatibility-c++0x.cc b/trunk/libstdc++-v3/src/c++11/compatibility-c++0x.cc --- a/trunk/libstdc++-v3/src/c++11/compatibility-c++0x.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/compatibility-c++0x.cc (working copy) @@ -86,7 +86,7 @@ namespace std _GLIBCXX_VISIBILITY(default) #ifdef _GLIBCXX_USE_WCHAR_T template<> struct hash - { + { size_t operator()(wstring) const; }; Index: libstdc++-v3/src/c++11/compatibility-chrono.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/compatibility-chrono.cc b/trunk/libstdc++-v3/src/c++11/compatibility-chrono.cc --- a/trunk/libstdc++-v3/src/c++11/compatibility-chrono.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/compatibility-chrono.cc (working copy) @@ -41,7 +41,7 @@ namespace std _GLIBCXX_VISIBILITY(default) namespace chrono { _GLIBCXX_BEGIN_NAMESPACE_VERSION - + // NB: Default configuration was no realtime. struct system_clock { Index: libstdc++-v3/src/c++11/cow-locale_init.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/cow-locale_init.cc b/trunk/libstdc++-v3/src/c++11/cow-locale_init.cc --- a/trunk/libstdc++-v3/src/c++11/cow-locale_init.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/cow-locale_init.cc (working copy) @@ -32,7 +32,7 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION -namespace +namespace { typedef char fake_collate_c[sizeof(std::collate)] __attribute__ ((aligned(__alignof__(std::collate)))); @@ -50,7 +50,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef char fake_money_get_c[sizeof(money_get)] __attribute__ ((aligned(__alignof__(money_get)))); fake_money_get_c money_get_c; - + typedef char fake_money_put_c[sizeof(money_put)] __attribute__ ((aligned(__alignof__(money_put)))); fake_money_put_c money_put_c; @@ -80,7 +80,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef char fake_money_get_w[sizeof(money_get)] __attribute__ ((aligned(__alignof__(money_get)))); fake_money_get_w money_get_w; - + typedef char fake_money_put_w[sizeof(money_put)] __attribute__ ((aligned(__alignof__(money_put)))); fake_money_put_w money_put_w; @@ -161,7 +161,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_init_facet_unchecked(new money_put); _M_init_facet_unchecked(new time_get); _M_init_facet_unchecked(new std::messages(__cloc, __s)); -#endif +#endif } // TODO should be in another file @@ -178,7 +178,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __ret.reserve(128); __ret += _S_categories[0]; __ret += '='; - __ret += _M_impl->_M_names[0]; + __ret += _M_impl->_M_names[0]; for (size_t __i = 1; __i < _S_categories_size; ++__i) { __ret += ';'; Index: libstdc++-v3/src/c++11/cow-string-inst.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/cow-string-inst.cc b/trunk/libstdc++-v3/src/c++11/cow-string-inst.cc --- a/trunk/libstdc++-v3/src/c++11/cow-string-inst.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/cow-string-inst.cc (working copy) @@ -42,17 +42,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // These came from c++98/misc-inst.cc, repeat them for COW string // string related to iostreams. - template - basic_istream& + template + basic_istream& operator>>(basic_istream&, string&); - template - basic_ostream& + template + basic_ostream& operator<<(basic_ostream&, const string&); - template - basic_istream& + template + basic_istream& getline(basic_istream&, string&, char); - template - basic_istream& + template + basic_istream& getline(basic_istream&, string&); _GLIBCXX_END_NAMESPACE_VERSION Index: libstdc++-v3/src/c++11/cow-wstring-inst.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/cow-wstring-inst.cc b/trunk/libstdc++-v3/src/c++11/cow-wstring-inst.cc --- a/trunk/libstdc++-v3/src/c++11/cow-wstring-inst.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/cow-wstring-inst.cc (working copy) @@ -46,17 +46,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // XXX these came from c++98/misc-inst.cc, repeat them for COW string // string related to iostreams - template - basic_istream& + template + basic_istream& operator>>(basic_istream&, wstring&); - template - basic_ostream& + template + basic_ostream& operator<<(basic_ostream&, const wstring&); - template - basic_istream& + template + basic_istream& getline(basic_istream&, wstring&, wchar_t); - template - basic_istream& + template + basic_istream& getline(basic_istream&, wstring&); _GLIBCXX_END_NAMESPACE_VERSION Index: libstdc++-v3/src/c++11/ctype.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/ctype.cc b/trunk/libstdc++-v3/src/c++11/ctype.cc --- a/trunk/libstdc++-v3/src/c++11/ctype.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/ctype.cc (working copy) @@ -45,7 +45,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Definitions for locale::id of standard facets that are specialized. locale::id ctype::id; -#ifdef _GLIBCXX_USE_WCHAR_T +#ifdef _GLIBCXX_USE_WCHAR_T locale::id ctype::id; #endif @@ -52,10 +52,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const size_t ctype::table_size; ctype::~ctype() - { + { _S_destroy_c_locale(_M_c_locale_ctype); - if (_M_del) - delete[] this->table(); + if (_M_del) + delete[] this->table(); } // Fill in the narrowing cache and flag whether all values are @@ -69,7 +69,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION for (size_t __i = 0; __i < sizeof(_M_narrow); ++__i) __tmp[__i] = __i; do_narrow(__tmp, __tmp + sizeof(__tmp), 0, _M_narrow); - + _M_narrow_ok = 1; if (__builtin_memcmp(__tmp, _M_narrow, sizeof(_M_narrow))) _M_narrow_ok = 2; @@ -92,7 +92,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION for (size_t __i = 0; __i < sizeof(_M_widen); ++__i) __tmp[__i] = __i; do_widen(__tmp, __tmp + sizeof(__tmp), _M_widen); - + _M_widen_ok = 1; // Set _M_widen_ok to 2 if memcpy can't be used. if (__builtin_memcmp(__tmp, _M_widen, sizeof(_M_widen))) @@ -100,22 +100,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } #ifdef _GLIBCXX_USE_WCHAR_T - ctype::ctype(size_t __refs) - : __ctype_abstract_base(__refs), + ctype::ctype(size_t __refs) + : __ctype_abstract_base(__refs), _M_c_locale_ctype(_S_get_c_locale()), _M_narrow_ok(false) { _M_initialize_ctype(); } - ctype::ctype(__c_locale __cloc, size_t __refs) + ctype::ctype(__c_locale __cloc, size_t __refs) : __ctype_abstract_base(__refs), _M_c_locale_ctype(_S_clone_c_locale(__cloc)), _M_narrow_ok(false) { _M_initialize_ctype(); } - ctype::~ctype() + ctype::~ctype() { _S_destroy_c_locale(_M_c_locale_ctype); } ctype_byname::ctype_byname(const char* __s, size_t __refs) - : ctype(__refs) - { + : ctype(__refs) + { if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { this->_S_destroy_c_locale(this->_M_c_locale_ctype); @@ -124,7 +124,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } } - ctype_byname::~ctype_byname() + ctype_byname::~ctype_byname() { } #endif Index: libstdc++-v3/src/c++11/ios.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/ios.cc b/trunk/libstdc++-v3/src/c++11/ios.cc --- a/trunk/libstdc++-v3/src/c++11/ios.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/ios.cc (working copy) @@ -74,21 +74,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION bool ios_base::Init::_S_synced_with_stdio = true; ios_base::ios_base() throw() - : _M_precision(), _M_width(), _M_flags(), _M_exception(), - _M_streambuf_state(), _M_callbacks(0), _M_word_zero(), + : _M_precision(), _M_width(), _M_flags(), _M_exception(), + _M_streambuf_state(), _M_callbacks(0), _M_word_zero(), _M_word_size(_S_local_word_size), _M_word(_M_local_word), _M_ios_locale() { - // Do nothing: basic_ios::init() does it. + // Do nothing: basic_ios::init() does it. // NB: _M_callbacks and _M_word must be zero for non-initialized // ios_base to go through ~ios_base gracefully. } - + // 27.4.2.7 ios_base constructors/destructors ios_base::~ios_base() { _M_call_callbacks(erase_event); _M_dispose_callbacks(); - if (_M_word != _M_local_word) + if (_M_word != _M_local_word) { delete [] _M_word; _M_word = 0; @@ -96,16 +96,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } // 27.4.2.5 ios_base storage functions - int + int ios_base::xalloc() throw() { // Implementation note: Initialize top to zero to ensure that // initialization occurs before main() is started. - static _Atomic_word _S_top = 0; + static _Atomic_word _S_top = 0; return __gnu_cxx::__exchange_and_add_dispatch(&_S_top, 1) + 4; } - void + void ios_base::register_callback(event_callback __fn, int __index) { _M_callbacks = new _Callback_list(__fn, __index, _M_callbacks); } @@ -140,9 +140,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_word_zero._M_pword = 0; return _M_word_zero; } - for (int __i = 0; __i < _M_word_size; __i++) + for (int __i = 0; __i < _M_word_size; __i++) __words[__i] = _M_word[__i]; - if (_M_word && _M_word != _M_local_word) + if (_M_word && _M_word != _M_local_word) { delete [] _M_word; _M_word = 0; @@ -165,21 +165,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return _M_word[__ix]; } - void + void ios_base::_M_call_callbacks(event __e) throw() { _Callback_list* __p = _M_callbacks; while (__p) { - __try - { (*__p->_M_fn) (__e, *this, __p->_M_index); } - __catch(...) + __try + { (*__p->_M_fn) (__e, *this, __p->_M_index); } + __catch(...) { } __p = __p->_M_next; } } - void + void ios_base::_M_dispose_callbacks(void) throw() { _Callback_list* __p = _M_callbacks; Index: libstdc++-v3/src/c++11/iostream-inst.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/iostream-inst.cc b/trunk/libstdc++-v3/src/c++11/iostream-inst.cc --- a/trunk/libstdc++-v3/src/c++11/iostream-inst.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/iostream-inst.cc (working copy) @@ -40,7 +40,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #ifdef _GLIBCXX_USE_WCHAR_T template class _Setfill; template _Setfill setfill(wchar_t); - template class basic_iostream; + template class basic_iostream; #endif _GLIBCXX_END_NAMESPACE_VERSION Index: libstdc++-v3/src/c++11/istream-inst.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/istream-inst.cc b/trunk/libstdc++-v3/src/c++11/istream-inst.cc --- a/trunk/libstdc++-v3/src/c++11/istream-inst.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/istream-inst.cc (working copy) @@ -50,7 +50,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template istream& operator>>(istream&, _Setw); template istream& istream::_M_extract(unsigned short&); - template istream& istream::_M_extract(unsigned int&); + template istream& istream::_M_extract(unsigned int&); template istream& istream::_M_extract(long&); template istream& istream::_M_extract(unsigned long&); template istream& istream::_M_extract(bool&); @@ -77,7 +77,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template wistream& operator>>(wistream&, _Setw); template wistream& wistream::_M_extract(unsigned short&); - template wistream& wistream::_M_extract(unsigned int&); + template wistream& wistream::_M_extract(unsigned int&); template wistream& wistream::_M_extract(long&); template wistream& wistream::_M_extract(unsigned long&); template wistream& wistream::_M_extract(bool&); Index: libstdc++-v3/src/c++11/limits.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/limits.cc b/trunk/libstdc++-v3/src/c++11/limits.cc --- a/trunk/libstdc++-v3/src/c++11/limits.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/limits.cc (working copy) @@ -163,7 +163,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // wchar_t // This used to be problematic... -#ifdef _GLIBCXX_USE_WCHAR_T +#ifdef _GLIBCXX_USE_WCHAR_T const bool numeric_limits::is_specialized; const int numeric_limits::digits; const int numeric_limits::digits10; Index: libstdc++-v3/src/c++11/locale-inst.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/locale-inst.cc b/trunk/libstdc++-v3/src/c++11/locale-inst.cc --- a/trunk/libstdc++-v3/src/c++11/locale-inst.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/locale-inst.cc (working copy) @@ -76,13 +76,13 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 template ostreambuf_iterator money_put >:: - _M_insert(ostreambuf_iterator, ios_base&, C, + _M_insert(ostreambuf_iterator, ios_base&, C, const string_type&) const; template ostreambuf_iterator money_put >:: - _M_insert(ostreambuf_iterator, ios_base&, C, + _M_insert(ostreambuf_iterator, ios_base&, C, const string_type&) const; _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 @@ -110,7 +110,7 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL istreambuf_iterator num_get >:: _M_extract_int(istreambuf_iterator, istreambuf_iterator, - ios_base&, ios_base::iostate&, + ios_base&, ios_base::iostate&, unsigned short&) const; template @@ -149,13 +149,13 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL template ostreambuf_iterator num_put >:: - _M_insert_int(ostreambuf_iterator, ios_base&, C, + _M_insert_int(ostreambuf_iterator, ios_base&, C, long) const; template ostreambuf_iterator num_put >:: - _M_insert_int(ostreambuf_iterator, ios_base&, C, + _M_insert_int(ostreambuf_iterator, ios_base&, C, unsigned long) const; #ifdef _GLIBCXX_USE_LONG_LONG @@ -162,13 +162,13 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL template ostreambuf_iterator num_put >:: - _M_insert_int(ostreambuf_iterator, ios_base&, C, + _M_insert_int(ostreambuf_iterator, ios_base&, C, long long) const; template ostreambuf_iterator num_put >:: - _M_insert_int(ostreambuf_iterator, ios_base&, C, + _M_insert_int(ostreambuf_iterator, ios_base&, C, unsigned long long) const; #endif @@ -175,13 +175,13 @@ _GLIBCXX_BEGIN_NAMESPACE_LDBL template ostreambuf_iterator num_put >:: - _M_insert_float(ostreambuf_iterator, ios_base&, C, char, + _M_insert_float(ostreambuf_iterator, ios_base&, C, char, double) const; template ostreambuf_iterator num_put >:: - _M_insert_float(ostreambuf_iterator, ios_base&, C, char, + _M_insert_float(ostreambuf_iterator, ios_base&, C, char, long double) const; #endif _GLIBCXX_END_NAMESPACE_LDBL @@ -206,7 +206,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 template class messages; template class messages_byname; _GLIBCXX_END_NAMESPACE_CXX11 - + // ctype ctype_byname::ctype_byname(const string& __s, size_t __refs) : ctype_byname(__s.c_str(), __refs) { } @@ -215,7 +215,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 inline template class __ctype_abstract_base; template class ctype_byname; #endif - + // codecvt #if ! _GLIBCXX_USE_CXX11_ABI inline template class __codecvt_abstract_base; @@ -230,126 +230,126 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 template class collate; template class collate_byname; _GLIBCXX_END_NAMESPACE_CXX11 - + // use_facet #if ! _GLIBCXX_USE_CXX11_ABI template - const ctype& + const ctype& use_facet >(const locale&); template - const codecvt& + const codecvt& use_facet >(const locale&); #endif template - const collate& + const collate& use_facet >(const locale&); template - const numpunct& + const numpunct& use_facet >(const locale&); #if ! _GLIBCXX_USE_CXX11_ABI - template - const num_put& + template + const num_put& use_facet >(const locale&); - template - const num_get& + template + const num_get& use_facet >(const locale&); #endif template - const moneypunct& + const moneypunct& use_facet >(const locale&); template - const moneypunct& + const moneypunct& use_facet >(const locale&); - template - const money_put& + template + const money_put& use_facet >(const locale&); - template - const money_get& + template + const money_get& use_facet >(const locale&); #if ! _GLIBCXX_USE_CXX11_ABI template - const __timepunct& + const __timepunct& use_facet<__timepunct >(const locale&); - template - const time_put& + template + const time_put& use_facet >(const locale&); #endif - template - const time_get& + template + const time_get& use_facet >(const locale&); - template - const messages& + template + const messages& use_facet >(const locale&); // has_facet #if ! _GLIBCXX_USE_CXX11_ABI - template + template bool has_facet >(const locale&); - template + template bool has_facet >(const locale&); #endif - template + template bool has_facet >(const locale&); - template + template bool has_facet >(const locale&); #if ! _GLIBCXX_USE_CXX11_ABI - template + template bool has_facet >(const locale&); - template + template bool has_facet >(const locale&); #endif - template + template bool has_facet >(const locale&); - template + template bool has_facet >(const locale&); - template + template bool has_facet >(const locale&); #if ! _GLIBCXX_USE_CXX11_ABI - template + template bool has_facet<__timepunct >(const locale&); - template + template bool has_facet >(const locale&); #endif - template + template bool has_facet >(const locale&); - template + template bool has_facet >(const locale&); @@ -358,7 +358,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 // locale functions. template C* - __add_grouping(C*, C, char const*, size_t, + __add_grouping(C*, C, char const*, size_t, C const*, C const*); template class __pad >; @@ -371,7 +371,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 #ifdef _GLIBCXX_USE_LONG_LONG template int - __int_to_char(C*, unsigned long long, const C*, + __int_to_char(C*, unsigned long long, const C*, ios_base::fmtflags, bool); #endif #endif Index: libstdc++-v3/src/c++11/placeholders.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/placeholders.cc b/trunk/libstdc++-v3/src/c++11/placeholders.cc --- a/trunk/libstdc++-v3/src/c++11/placeholders.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/placeholders.cc (working copy) @@ -30,7 +30,7 @@ namespace std _GLIBCXX_VISIBILITY(default) { - namespace placeholders + namespace placeholders { _GLIBCXX_BEGIN_NAMESPACE_VERSION extern const _Placeholder<1> _1{}; Index: libstdc++-v3/src/c++11/sstream-inst.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/sstream-inst.cc b/trunk/libstdc++-v3/src/c++11/sstream-inst.cc --- a/trunk/libstdc++-v3/src/c++11/sstream-inst.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/sstream-inst.cc (working copy) @@ -44,9 +44,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #ifdef _GLIBCXX_USE_WCHAR_T template class basic_stringbuf; - template class basic_istringstream; - template class basic_ostringstream; - template class basic_stringstream; + template class basic_istringstream; + template class basic_ostringstream; + template class basic_stringstream; #endif _GLIBCXX_END_NAMESPACE_VERSION Index: libstdc++-v3/src/c++11/string-inst.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/string-inst.cc b/trunk/libstdc++-v3/src/c++11/string-inst.cc --- a/trunk/libstdc++-v3/src/c++11/string-inst.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/string-inst.cc (working copy) @@ -53,7 +53,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template S operator+(C, const S&); template S operator+(const S&, const S&); - // Only one template keyword allowed here. + // Only one template keyword allowed here. // See core issue #46 (NAD) // http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#46 template @@ -62,17 +62,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template S::basic_string(const C*, const C*, const allocator&); - template + template S::basic_string(S::iterator, S::iterator, const allocator&); #if _GLIBCXX_USE_CXX11_ABI - template + template void S::_M_construct(S::iterator, S::iterator, forward_iterator_tag); - template + template void - S::_M_construct(S::const_iterator, S::const_iterator, + S::_M_construct(S::const_iterator, S::const_iterator, forward_iterator_tag); template @@ -85,9 +85,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #else // !_GLIBCXX_USE_CXX11_ABI - template - C* - S::_S_construct(S::iterator, S::iterator, + template + C* + S::_S_construct(S::iterator, S::iterator, const allocator&, forward_iterator_tag); template Index: libstdc++-v3/src/c++11/system_error.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++11/system_error.cc b/trunk/libstdc++-v3/src/c++11/system_error.cc --- a/trunk/libstdc++-v3/src/c++11/system_error.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++11/system_error.cc (working copy) @@ -33,8 +33,8 @@ namespace { - using std::string; - + using std::string; + struct generic_error_category : public std::error_category { virtual const char* @@ -42,7 +42,7 @@ namespace { return "generic"; } _GLIBCXX_DEFAULT_ABI_TAG - virtual string + virtual string message(int i) const { // XXX locale issues: how does one get or set loc. @@ -77,28 +77,28 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION error_category::~error_category() noexcept = default; - const error_category& + const error_category& _V2::system_category() noexcept { return system_category_instance; } - const error_category& + const error_category& _V2::generic_category() noexcept { return generic_category_instance; } - + system_error::~system_error() noexcept = default; - error_condition + error_condition error_category::default_error_condition(int __i) const noexcept { return error_condition(__i, *this); } - bool + bool error_category::equivalent(int __i, const error_condition& __cond) const noexcept { return default_error_condition(__i) == __cond; } - bool + bool error_category::equivalent(const error_code& __code, int __i) const noexcept { return *this == __code.category() && __code.value() == __i; } - error_condition + error_condition error_code::default_error_condition() const noexcept { return category().default_error_condition(value()); } Index: libstdc++-v3/src/c++98/Makefile.am =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/Makefile.am b/trunk/libstdc++-v3/src/c++98/Makefile.am --- a/trunk/libstdc++-v3/src/c++98/Makefile.am (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/Makefile.am (working copy) @@ -23,7 +23,7 @@ include $(top_srcdir)/fragment.am # Convenience library for C++98 runtime. -noinst_LTLIBRARIES = libc++98convenience.la +noinst_LTLIBRARIES = libc++98convenience.la headers = @@ -209,7 +209,7 @@ concept-inst.o: concept-inst.cc $(CXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $< # Use special rules for parallel mode compilation. -PARALLEL_FLAGS = -D_GLIBCXX_PARALLEL +PARALLEL_FLAGS = -D_GLIBCXX_PARALLEL parallel_settings.lo: parallel_settings.cc $(LTCXXCOMPILE) $(PARALLEL_FLAGS) -c $< parallel_settings.o: parallel_settings.cc @@ -243,7 +243,7 @@ AM_MAKEFLAGS = \ # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to # attempt to infer which configuration to use. -# +# # The second tag argument, `--tag disable-shared` means that libtool # only compiles each source once, for static objects. In actuality, # glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to Index: libstdc++-v3/src/c++98/Makefile.in =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/Makefile.in b/trunk/libstdc++-v3/src/c++98/Makefile.in --- a/trunk/libstdc++-v3/src/c++98/Makefile.in (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/Makefile.in (working copy) @@ -329,9 +329,9 @@ PWD_COMMAND = $${PWDCMD-pwd} STAMP = echo timestamp > toolexecdir = $(glibcxx_toolexecdir) toolexeclibdir = $(glibcxx_toolexeclibdir) -@ENABLE_WERROR_FALSE@WERROR_FLAG = +@ENABLE_WERROR_FALSE@WERROR_FLAG = @ENABLE_WERROR_TRUE@WERROR_FLAG = $(WERROR) -@ENABLE_EXTERN_TEMPLATE_FALSE@XTEMPLATE_FLAGS = +@ENABLE_EXTERN_TEMPLATE_FALSE@XTEMPLATE_FLAGS = @ENABLE_EXTERN_TEMPLATE_TRUE@XTEMPLATE_FLAGS = -fno-implicit-templates # These bits are all figured out from configure. Look in acinclude.m4 @@ -340,7 +340,7 @@ CONFIG_CXXFLAGS = \ $(SECTION_FLAGS) $(HWCAP_FLAGS) -frandom-seed=$@ WARN_CXXFLAGS = \ - $(WARN_FLAGS) $(WERROR_FLAG) -fdiagnostics-show-location=once + $(WARN_FLAGS) $(WERROR_FLAG) -fdiagnostics-show-location=once # -I/-D flags to pass when compiling. @@ -347,8 +347,8 @@ WARN_CXXFLAGS = \ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) $(CPPFLAGS) # Convenience library for C++98 runtime. -noinst_LTLIBRARIES = libc++98convenience.la -headers = +noinst_LTLIBRARIES = libc++98convenience.la +headers = @ENABLE_DUAL_ABI_TRUE@cow_string_host_sources = \ @ENABLE_DUAL_ABI_TRUE@ collate_members_cow.cc \ @ENABLE_DUAL_ABI_TRUE@ messages_members_cow.cc \ @@ -376,12 +376,12 @@ host_sources_extra = \ basic_file.cc c++locale.cc \ ${inst_sources} ${parallel_sources} -@ENABLE_DUAL_ABI_FALSE@cxx11_abi_sources = +@ENABLE_DUAL_ABI_FALSE@cxx11_abi_sources = @ENABLE_DUAL_ABI_TRUE@cxx11_abi_sources = \ @ENABLE_DUAL_ABI_TRUE@ cow-istream-string.cc # XTEMPLATE_FLAGS = -@ENABLE_EXTERN_TEMPLATE_FALSE@inst_sources = +@ENABLE_EXTERN_TEMPLATE_FALSE@inst_sources = # XTEMPLATE_FLAGS = -fno-implicit-templates @ENABLE_EXTERN_TEMPLATE_TRUE@inst_sources = \ @@ -435,7 +435,7 @@ libc__98convenience_la_SOURCES = $(sources) GLIBCXX_INCLUDE_DIR = $(glibcxx_builddir)/include # Use special rules for parallel mode compilation. -PARALLEL_FLAGS = -D_GLIBCXX_PARALLEL +PARALLEL_FLAGS = -D_GLIBCXX_PARALLEL # AM_CXXFLAGS needs to be in each subdirectory so that it can be # modified in a per-library or per-sub-library way. Need to manually @@ -466,7 +466,7 @@ AM_MAKEFLAGS = \ # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to # attempt to infer which configuration to use. -# +# # The second tag argument, `--tag disable-shared` means that libtool # only compiles each source once, for static objects. In actuality, # glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to @@ -543,7 +543,7 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libc++98convenience.la: $(libc__98convenience_la_OBJECTS) $(libc__98convenience_la_DEPENDENCIES) $(EXTRA_libc__98convenience_la_DEPENDENCIES) +libc++98convenience.la: $(libc__98convenience_la_OBJECTS) $(libc__98convenience_la_DEPENDENCIES) $(EXTRA_libc__98convenience_la_DEPENDENCIES) $(CXXLINK) $(libc__98convenience_la_OBJECTS) $(libc__98convenience_la_LIBADD) $(LIBS) mostlyclean-compile: Index: libstdc++-v3/src/c++98/bitmap_allocator.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/bitmap_allocator.cc b/trunk/libstdc++-v3/src/c++98/bitmap_allocator.cc --- a/trunk/libstdc++-v3/src/c++98/bitmap_allocator.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/bitmap_allocator.cc (working copy) @@ -39,7 +39,7 @@ namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) template class __mini_vector; - template size_t** __lower_bound(size_t**, size_t**, size_t const&, + template size_t** __lower_bound(size_t**, size_t**, size_t const&, free_list::_LT_pointer_compare); _GLIBCXX_END_NAMESPACE_VERSION } @@ -56,7 +56,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif const vector_type& __free_list = _M_get_free_list(); using __gnu_cxx::__detail::__lower_bound; - iterator __tmp = __lower_bound(__free_list.begin(), __free_list.end(), + iterator __tmp = __lower_bound(__free_list.begin(), __free_list.end(), __sz, _LT_pointer_compare()); if (__tmp == __free_list.end() || !_M_should_i_give(**__tmp, __sz)) Index: libstdc++-v3/src/c++98/codecvt.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/codecvt.cc b/trunk/libstdc++-v3/src/c++98/codecvt.cc --- a/trunk/libstdc++-v3/src/c++98/codecvt.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/codecvt.cc (working copy) @@ -31,7 +31,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Definitions for locale::id of standard facets that are specialized. locale::id codecvt::id; -#ifdef _GLIBCXX_USE_WCHAR_T +#ifdef _GLIBCXX_USE_WCHAR_T locale::id codecvt::id; #endif @@ -50,34 +50,34 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION codecvt:: ~codecvt() { _S_destroy_c_locale(_M_c_locale_codecvt); } - + codecvt_base::result codecvt:: - do_out(state_type&, const intern_type* __from, + do_out(state_type&, const intern_type* __from, const intern_type*, const intern_type*& __from_next, - extern_type* __to, extern_type*, + extern_type* __to, extern_type*, extern_type*& __to_next) const - { + { // _GLIBCXX_RESOLVE_LIB_DEFECTS // According to the resolution of DR19, "If returns noconv [...] // there are no changes to the values in [to, to_limit)." - __from_next = __from; + __from_next = __from; __to_next = __to; - return noconv; + return noconv; } - + codecvt_base::result codecvt:: do_unshift(state_type&, extern_type* __to, extern_type*, extern_type*& __to_next) const - { - __to_next = __to; - return noconv; + { + __to_next = __to; + return noconv; } - + codecvt_base::result codecvt:: - do_in(state_type&, const extern_type* __from, + do_in(state_type&, const extern_type* __from, const extern_type*, const extern_type*& __from_next, intern_type* __to, intern_type*, intern_type*& __to_next) const { @@ -84,35 +84,35 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // _GLIBCXX_RESOLVE_LIB_DEFECTS // According to the resolution of DR19, "If returns noconv [...] // there are no changes to the values in [to, to_limit)." - __from_next = __from; + __from_next = __from; __to_next = __to; - return noconv; + return noconv; } - int + int codecvt:: - do_encoding() const throw() + do_encoding() const throw() { return 1; } - - bool + + bool codecvt:: - do_always_noconv() const throw() + do_always_noconv() const throw() { return true; } - - int + + int codecvt:: do_length (state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const - { + { size_t __d = static_cast(__end - __from); - return std::min(__max, __d); + return std::min(__max, __d); } - - int + + int codecvt:: - do_max_length() const throw() + do_max_length() const throw() { return 1; } - + #ifdef _GLIBCXX_USE_WCHAR_T // codecvt required specialization codecvt:: @@ -130,7 +130,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION codecvt:: ~codecvt() { _S_destroy_c_locale(_M_c_locale_codecvt); } - + codecvt_base::result codecvt:: do_unshift(state_type&, extern_type* __to, @@ -140,8 +140,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __to_next = __to; return noconv; } - - bool + + bool codecvt:: do_always_noconv() const throw() { return false; } Index: libstdc++-v3/src/c++98/compatibility.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/compatibility.cc b/trunk/libstdc++-v3/src/c++98/compatibility.cc --- a/trunk/libstdc++-v3/src/c++98/compatibility.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/compatibility.cc (working copy) @@ -62,7 +62,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { if (__n == 1) return ignore(); - + _M_gcount = 0; sentry __cerb(*this, true); if ( __n > 0 && __cerb) @@ -94,7 +94,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { ++_M_gcount; __c = __sb->snextc(); - } + } } if (__n == __gnu_cxx::__numeric_traits::__max && !traits_type::eq_int_type(__c, __eof)) @@ -124,7 +124,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION this->setstate(__err); } return *this; - } + } #ifdef _GLIBCXX_USE_WCHAR_T template<> @@ -134,7 +134,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { if (__n == 1) return ignore(); - + _M_gcount = 0; sentry __cerb(*this, true); if (__n > 0 && __cerb) @@ -296,7 +296,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // std::istream template basic_istream& - basic_istream::ignore(); + basic_istream::ignore(); template bool @@ -332,7 +332,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template void - basic_string::_M_check_length(size_t, size_t, + basic_string::_M_check_length(size_t, size_t, const char*) const; template @@ -341,7 +341,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template basic_istream& - basic_istream::ignore(); + basic_istream::ignore(); template bool @@ -396,7 +396,7 @@ _ZN10__gnu_norm15_List_node_base6unhookEv; _ZN10__gnu_norm15_List_node_base7reverseEv; _ZN10__gnu_norm15_List_node_base8transferEPS0_S1_; */ -#include "list.cc" +#include "list.cc" _GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX7_M_hookEPS0_, \ _ZN10__gnu_norm15_List_node_base4hookEPS0_, \ GLIBCXX_3.4) @@ -419,7 +419,7 @@ GLIBCXX_3.4) #undef _List_node_base // gcc-4.1.0 -// Long double versions of "C" math functions. +// Long double versions of "C" math functions. #if defined (_GLIBCXX_LONG_DOUBLE_COMPAT) \ || (defined (__arm__) && defined (__linux__) && defined (__ARM_EABI__)) \ || (defined (__hppa__) && defined (__linux__)) \ Index: libstdc++-v3/src/c++98/complex_io.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/complex_io.cc b/trunk/libstdc++-v3/src/c++98/complex_io.cc --- a/trunk/libstdc++-v3/src/c++98/complex_io.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/complex_io.cc (working copy) @@ -34,7 +34,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template basic_ostream >& - operator<<(basic_ostream >&, + operator<<(basic_ostream >&, const complex&); template @@ -43,12 +43,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template basic_ostream >& - operator<<(basic_ostream >&, + operator<<(basic_ostream >&, const complex&); template basic_istream >& - operator>>(basic_istream >&, + operator>>(basic_istream >&, complex&); template Index: libstdc++-v3/src/c++98/ext-inst.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/ext-inst.cc b/trunk/libstdc++-v3/src/c++98/ext-inst.cc --- a/trunk/libstdc++-v3/src/c++98/ext-inst.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/ext-inst.cc (working copy) @@ -38,7 +38,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template - const unsigned long + const unsigned long rope >::_S_min_len[min_len]; template @@ -48,7 +48,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #ifdef _GLIBCXX_USE_WCHAR_T template - const unsigned long + const unsigned long rope >::_S_min_len[min_len]; template Index: libstdc++-v3/src/c++98/globals_io.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/globals_io.cc b/trunk/libstdc++-v3/src/c++98/globals_io.cc --- a/trunk/libstdc++-v3/src/c++98/globals_io.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/globals_io.cc (working copy) @@ -38,7 +38,7 @@ // NB: asm directives can rename these non-exported, namespace // __gnu_cxx symbols into exported, namespace std symbols with the // appropriate symbol version name. -// The rename syntax is +// The rename syntax is // asm (".symver currentname,oldname@@GLIBCXX_3.2") // In macro form: // _GLIBCXX_ASM_SYMVER(currentname, oldname, GLIBCXX_3.2) @@ -51,7 +51,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // NB: Iff is included, these definitions become wonky. typedef char fake_istream[sizeof(istream)] __attribute__ ((aligned(__alignof__(istream)))); - typedef char fake_ostream[sizeof(ostream)] + typedef char fake_ostream[sizeof(ostream)] __attribute__ ((aligned(__alignof__(ostream)))); fake_istream cin; fake_ostream cout; @@ -59,9 +59,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION fake_ostream clog; #ifdef _GLIBCXX_USE_WCHAR_T - typedef char fake_wistream[sizeof(wistream)] + typedef char fake_wistream[sizeof(wistream)] __attribute__ ((aligned(__alignof__(wistream)))); - typedef char fake_wostream[sizeof(wostream)] + typedef char fake_wostream[sizeof(wostream)] __attribute__ ((aligned(__alignof__(wostream)))); fake_wistream wcin; fake_wostream wcout; Index: libstdc++-v3/src/c++98/hash-long-double-tr1-aux.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/hash-long-double-tr1-aux.cc b/trunk/libstdc++-v3/src/c++98/hash-long-double-tr1-aux.cc --- a/trunk/libstdc++-v3/src/c++98/hash-long-double-tr1-aux.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/hash-long-double-tr1-aux.cc (working copy) @@ -24,7 +24,7 @@ namespace std _GLIBCXX_VISIBILITY(default) { - namespace tr1 + namespace tr1 { // For long double, careful with random padding bits (e.g., on x86, // 10 bytes -> 12 bytes) and resort to frexp. Index: libstdc++-v3/src/c++98/hash_tr1.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/hash_tr1.cc b/trunk/libstdc++-v3/src/c++98/hash_tr1.cc --- a/trunk/libstdc++-v3/src/c++98/hash_tr1.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/hash_tr1.cc (working copy) @@ -30,7 +30,7 @@ namespace std _GLIBCXX_VISIBILITY(default) { - namespace tr1 + namespace tr1 { #ifndef _GLIBCXX_LONG_DOUBLE_COMPAT_IMPL template<> Index: libstdc++-v3/src/c++98/hashtable_tr1.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/hashtable_tr1.cc b/trunk/libstdc++-v3/src/c++98/hashtable_tr1.cc --- a/trunk/libstdc++-v3/src/c++98/hashtable_tr1.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/hashtable_tr1.cc (working copy) @@ -26,7 +26,7 @@ namespace std _GLIBCXX_VISIBILITY(default) { - namespace tr1 + namespace tr1 { #include "../shared/hashtable-aux.cc" } Index: libstdc++-v3/src/c++98/ios_failure.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/ios_failure.cc b/trunk/libstdc++-v3/src/c++98/ios_failure.cc --- a/trunk/libstdc++-v3/src/c++98/ios_failure.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/ios_failure.cc (working copy) @@ -38,7 +38,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ios_base::failure::~failure() throw() { } - + const char* ios_base::failure::what() const throw() { return _M_msg.c_str(); } Index: libstdc++-v3/src/c++98/ios_init.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/ios_init.cc b/trunk/libstdc++-v3/src/c++98/ios_init.cc --- a/trunk/libstdc++-v3/src/c++98/ios_init.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/ios_init.cc (working copy) @@ -62,7 +62,7 @@ namespace std _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION using namespace __gnu_internal; - + extern istream cin; extern ostream cout; extern ostream cerr; @@ -109,9 +109,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION new (&wclog) wostream(&buf_wcerr_sync); wcin.tie(&wcout); wcerr.setf(ios_base::unitbuf); - wcerr.tie(&wcout); + wcerr.tie(&wcout); #endif - + // NB: Have to set refcount above one, so that standard // streams are not re-initialized with uses of ios_base::Init // besides static object, ie just using with @@ -129,26 +129,26 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_S_refcount); // Catch any exceptions thrown by basic_ostream::flush() __try - { + { // Flush standard output streams as required by 27.4.2.1.6 cout.flush(); cerr.flush(); clog.flush(); - + #ifdef _GLIBCXX_USE_WCHAR_T wcout.flush(); wcerr.flush(); - wclog.flush(); + wclog.flush(); #endif } __catch(...) { } } - } + } - bool + bool ios_base::sync_with_stdio(bool __sync) - { + { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 49. Underspecification of ios_base::sync_with_stdio bool __ret = ios_base::Init::_S_synced_with_stdio; @@ -185,7 +185,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION cin.rdbuf(&buf_cin); cerr.rdbuf(&buf_cerr); clog.rdbuf(&buf_cerr); - + #ifdef _GLIBCXX_USE_WCHAR_T new (&buf_wcout) stdio_filebuf(stdout, ios_base::out); new (&buf_wcin) stdio_filebuf(stdin, ios_base::in); @@ -196,7 +196,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION wclog.rdbuf(&buf_wcerr); #endif } - return __ret; + return __ret; } _GLIBCXX_END_NAMESPACE_VERSION Index: libstdc++-v3/src/c++98/istream.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/istream.cc b/trunk/libstdc++-v3/src/c++98/istream.cc --- a/trunk/libstdc++-v3/src/c++98/istream.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/istream.cc (working copy) @@ -48,7 +48,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); - + while (_M_gcount + 1 < __n && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __idelim)) @@ -82,7 +82,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __err |= ios_base::eofbit; else if (traits_type::eq_int_type(__c, __idelim)) { - ++_M_gcount; + ++_M_gcount; __sb->sbumpc(); } else @@ -290,7 +290,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); - + while (_M_gcount + 1 < __n && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __idelim)) @@ -324,7 +324,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __err |= ios_base::eofbit; else if (traits_type::eq_int_type(__c, __idelim)) { - ++_M_gcount; + ++_M_gcount; __sb->sbumpc(); } else Index: libstdc++-v3/src/c++98/locale.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/locale.cc b/trunk/libstdc++-v3/src/c++98/locale.cc --- a/trunk/libstdc++-v3/src/c++98/locale.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/locale.cc (working copy) @@ -69,7 +69,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // These are no longer exported. locale::_Impl* locale::_S_classic; - locale::_Impl* locale::_S_global; + locale::_Impl* locale::_S_global; #ifdef __GTHREADS __gthread_once_t locale::_S_once = __GTHREAD_ONCE_INIT; @@ -132,7 +132,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __ret.reserve(128); __ret += _S_categories[0]; __ret += '='; - __ret += _M_impl->_M_names[0]; + __ret += _M_impl->_M_names[0]; for (size_t __i = 1; __i < _S_categories_size; ++__i) { __ret += ';'; @@ -145,7 +145,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } locale::category - locale::_S_normalize_category(category __cat) + locale::_S_normalize_category(category __cat) { int __ret = 0; if (__cat == none || ((__cat & all) && !(__cat & ~all))) @@ -155,27 +155,27 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // NB: May be a C-style "LC_ALL" category; convert. switch (__cat) { - case LC_COLLATE: - __ret = collate; + case LC_COLLATE: + __ret = collate; break; - case LC_CTYPE: + case LC_CTYPE: __ret = ctype; break; - case LC_MONETARY: + case LC_MONETARY: __ret = monetary; break; - case LC_NUMERIC: + case LC_NUMERIC: __ret = numeric; break; - case LC_TIME: - __ret = time; + case LC_TIME: + __ret = time; break; #ifdef _GLIBCXX_HAVE_LC_MESSAGES - case LC_MESSAGES: + case LC_MESSAGES: __ret = messages; break; -#endif - case LC_ALL: +#endif + case LC_ALL: __ret = all; break; default: @@ -237,12 +237,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (_M_caches) for (size_t __i = 0; __i < _M_facets_size; ++__i) if (_M_caches[__i]) - _M_caches[__i]->_M_remove_reference(); + _M_caches[__i]->_M_remove_reference(); delete [] _M_caches; if (_M_names) for (size_t __i = 0; __i < _S_categories_size; ++__i) - delete [] _M_names[__i]; + delete [] _M_names[__i]; delete [] _M_names; } @@ -266,7 +266,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { _M_caches[__j] = __imp._M_caches[__j]; if (_M_caches[__j]) - _M_caches[__j]->_M_add_reference(); + _M_caches[__j]->_M_add_reference(); } _M_names = new char*[_S_categories_size]; for (size_t __k = 0; __k < _S_categories_size; ++__k) @@ -290,22 +290,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void locale::_Impl:: - _M_replace_category(const _Impl* __imp, + _M_replace_category(const _Impl* __imp, const locale::id* const* __idpp) { for (; *__idpp; ++__idpp) _M_replace_facet(__imp, *__idpp); } - + void locale::_Impl:: _M_replace_facet(const _Impl* __imp, const locale::id* __idp) { size_t __index = __idp->_M_id(); - if ((__index > (__imp->_M_facets_size - 1)) + if ((__index > (__imp->_M_facets_size - 1)) || !__imp->_M_facets[__index]) __throw_runtime_error(__N("locale::_Impl::_M_replace_facet")); - _M_install_facet(__idp, __imp->_M_facets[__index]); + _M_install_facet(__idp, __imp->_M_facets[__index]); } void @@ -324,7 +324,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // New facet array. const facet** __oldf = _M_facets; const facet** __newf; - __newf = new const facet*[__new_size]; + __newf = new const facet*[__new_size]; for (size_t __i = 0; __i < _M_facets_size; ++__i) __newf[__i] = _M_facets[__i]; for (size_t __l = _M_facets_size; __l < __new_size; ++__l) Index: libstdc++-v3/src/c++98/locale_facets.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/locale_facets.cc b/trunk/libstdc++-v3/src/c++98/locale_facets.cc --- a/trunk/libstdc++-v3/src/c++98/locale_facets.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/locale_facets.cc (working copy) @@ -28,26 +28,26 @@ namespace std _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION // Definitions for static const data members of time_base. - template<> + template<> const char* __timepunct_cache::_S_timezones[14] = - { - "GMT", "HST", "AKST", "PST", "MST", "CST", "EST", "AST", "NST", "CET", - "IST", "EET", "CST", "JST" + { + "GMT", "HST", "AKST", "PST", "MST", "CST", "EST", "AST", "NST", "CET", + "IST", "EET", "CST", "JST" }; - + #ifdef _GLIBCXX_USE_WCHAR_T - template<> + template<> const wchar_t* __timepunct_cache::_S_timezones[14] = - { - L"GMT", L"HST", L"AKST", L"PST", L"MST", L"CST", L"EST", L"AST", - L"NST", L"CET", L"IST", L"EET", L"CST", L"JST" + { + L"GMT", L"HST", L"AKST", L"PST", L"MST", L"CST", L"EST", L"AST", + L"NST", L"CET", L"IST", L"EET", L"CST", L"JST" }; #endif // Definitions for static const data members of money_base. - const money_base::pattern + const money_base::pattern money_base::_S_default_pattern = { {symbol, sign, none, value} }; const char* money_base::_S_atoms = "-0123456789"; @@ -59,7 +59,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // According to the resolution of DR 231, about 22.2.2.2.2, p11, // "str.precision() is specified in the conversion specification". void - __num_base::_S_format_float(const ios_base& __io, char* __fptr, + __num_base::_S_format_float(const ios_base& __io, char* __fptr, char __mod) throw() { ios_base::fmtflags __flags = __io.flags(); @@ -108,7 +108,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const size_t __min = std::min(__n, size_t(__grouping_size - 1)); size_t __i = __n; bool __test = true; - + // Parsed number groupings have to match the // numpunct::grouping string exactly, starting at the // right-most point of the parsed sequence of elements ... Index: libstdc++-v3/src/c++98/locale_init.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/locale_init.cc b/trunk/libstdc++-v3/src/c++98/locale_init.cc --- a/trunk/libstdc++-v3/src/c++98/locale_init.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/locale_init.cc (working copy) @@ -55,7 +55,7 @@ _GLIBCXX_LOC_ID(_ZNSt8messagesIwE2idE); #endif -namespace +namespace { const int num_facets = _GLIBCXX_NUM_FACETS + _GLIBCXX_NUM_UNICODE_FACETS + (_GLIBCXX_USE_DUAL_ABI ? _GLIBCXX_NUM_CXX11_FACETS : 0); @@ -125,7 +125,7 @@ _GLIBCXX_LOC_ID(_ZNSt8messagesIwE2idE); typedef char fake_money_get_c[sizeof(money_get)] __attribute__ ((aligned(__alignof__(money_get)))); fake_money_get_c money_get_c; - + typedef char fake_money_put_c[sizeof(money_put)] __attribute__ ((aligned(__alignof__(money_put)))); fake_money_put_c money_put_c; @@ -179,7 +179,7 @@ _GLIBCXX_LOC_ID(_ZNSt8messagesIwE2idE); typedef char fake_money_get_w[sizeof(money_get)] __attribute__ ((aligned(__alignof__(money_get)))); fake_money_get_w money_get_w; - + typedef char fake_money_put_w[sizeof(money_put)] __attribute__ ((aligned(__alignof__(money_put)))); fake_money_put_w money_put_w; @@ -246,7 +246,7 @@ namespace std _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION locale::locale() throw() : _M_impl(0) - { + { _S_initialize(); // Checked locking to optimize the common case where _S_global @@ -294,7 +294,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const locale& locale::classic() - { + { _S_initialize(); return *(new (&c_locale) locale(_S_classic)); } @@ -305,10 +305,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // 2 references. // One reference for _S_classic, one for _S_global _S_classic = new (&c_locale_impl) _Impl(2); - _S_global = _S_classic; + _S_global = _S_classic; } - void + void locale::_S_initialize() { #ifdef __GTHREADS @@ -323,7 +323,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const locale::id* const locale::_Impl::_S_id_ctype[] = { - &std::ctype::id, + &std::ctype::id, &codecvt::id, #ifdef _GLIBCXX_USE_WCHAR_T &std::ctype::id, @@ -339,9 +339,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const locale::id* const locale::_Impl::_S_id_numeric[] = { - &num_get::id, - &num_put::id, - &numpunct::id, + &num_get::id, + &num_put::id, + &numpunct::id, #ifdef _GLIBCXX_USE_WCHAR_T &num_get::id, &num_put::id, @@ -349,7 +349,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif 0 }; - + const locale::id* const locale::_Impl::_S_id_collate[] = { @@ -363,24 +363,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const locale::id* const locale::_Impl::_S_id_time[] = { - &__timepunct::id, - &time_get::id, - &time_put::id, + &__timepunct::id, + &time_get::id, + &time_put::id, #ifdef _GLIBCXX_USE_WCHAR_T - &__timepunct::id, + &__timepunct::id, &time_get::id, &time_put::id, #endif 0 }; - + const locale::id* const locale::_Impl::_S_id_monetary[] = { - &money_get::id, - &money_put::id, - &moneypunct::id, - &moneypunct::id, + &money_get::id, + &money_put::id, + &moneypunct::id, + &moneypunct::id, #ifdef _GLIBCXX_USE_WCHAR_T &money_get::id, &money_put::id, @@ -393,7 +393,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const locale::id* const locale::_Impl::_S_id_messages[] = { - &std::messages::id, + &std::messages::id, #ifdef _GLIBCXX_USE_WCHAR_T &std::messages::id, #endif @@ -457,9 +457,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Construct "C" _Impl. locale::_Impl:: - _Impl(size_t __refs) throw() + _Impl(size_t __refs) throw() : _M_refcount(__refs), _M_facets(0), _M_facets_size(num_facets), - _M_caches(0), _M_names(0) + _M_caches(0), _M_names(0) { _M_facets = new (&facet_vec) const facet*[_M_facets_size](); _M_caches = new (&cache_vec) const facet*[_M_facets_size](); @@ -503,7 +503,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_init_facet(new (&time_get_c) time_get(1)); _M_init_facet(new (&time_put_c) time_put(1)); - _M_init_facet(new (&messages_c) std::messages(1)); + _M_init_facet(new (&messages_c) std::messages(1)); #ifdef _GLIBCXX_USE_WCHAR_T _M_init_facet(new (&ctype_w) std::ctype(1)); Index: libstdc++-v3/src/c++98/localename.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/localename.cc b/trunk/libstdc++-v3/src/c++98/localename.cc --- a/trunk/libstdc++-v3/src/c++98/localename.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/localename.cc (working copy) @@ -36,7 +36,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { if (__s) { - _S_initialize(); + _S_initialize(); if (std::strcmp(__s, "C") == 0 || std::strcmp(__s, "POSIX") == 0) (_M_impl = _S_classic)->_M_add_reference(); else if (std::strcmp(__s, "") != 0) @@ -48,7 +48,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // If LC_ALL is set we are done. if (__env && std::strcmp(__env, "") != 0) { - if (std::strcmp(__env, "C") == 0 + if (std::strcmp(__env, "C") == 0 || std::strcmp(__env, "POSIX") == 0) (_M_impl = _S_classic)->_M_add_reference(); else @@ -59,13 +59,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // LANG may set a default different from "C". string __lang; __env = std::getenv("LANG"); - if (!__env || std::strcmp(__env, "") == 0 - || std::strcmp(__env, "C") == 0 + if (!__env || std::strcmp(__env, "") == 0 + || std::strcmp(__env, "C") == 0 || std::strcmp(__env, "POSIX") == 0) __lang = "C"; - else + else __lang = __env; - + // Scan the categories looking for the first one // different from LANG. size_t __i = 0; @@ -73,8 +73,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION for (; __i < _S_categories_size; ++__i) { __env = std::getenv(_S_categories[__i]); - if (__env && std::strcmp(__env, "") != 0 - && std::strcmp(__env, "C") != 0 + if (__env && std::strcmp(__env, "") != 0 + && std::strcmp(__env, "C") != 0 && std::strcmp(__env, "POSIX") != 0) break; } @@ -86,7 +86,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION && __lang != __env) break; } - + // If one is found, build the complete string of // the form LC_CTYPE=xxx;LC_NUMERIC=yyy; and so on... if (__i < _S_categories_size) @@ -143,7 +143,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION locale::locale(const locale& __base, const char* __s, category __cat) : _M_impl(0) - { + { // NB: There are complicated, yet more efficient ways to do // this. Building up locales on a per-category way is tedious, so // let's do it this way until people complain. @@ -156,17 +156,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { _M_coalesce(__base, __add, __cat); } void - locale::_M_coalesce(const locale& __base, const locale& __add, + locale::_M_coalesce(const locale& __base, const locale& __add, category __cat) { - __cat = _S_normalize_category(__cat); - _M_impl = new _Impl(*__base._M_impl, 1); + __cat = _S_normalize_category(__cat); + _M_impl = new _Impl(*__base._M_impl, 1); - __try + __try { _M_impl->_M_replace_categories(__add._M_impl, __cat); } - __catch(...) - { - _M_impl->_M_remove_reference(); + __catch(...) + { + _M_impl->_M_remove_reference(); __throw_exception_again; } } @@ -235,7 +235,7 @@ const int num_facets = _GLIBCXX_NUM_FACETS + _GLIB __smon); } } - + // Construct all standard facets and add them to _M_facets. _M_init_facet(new std::ctype(__cloc, 0, false)); _M_init_facet(new codecvt(__cloc)); @@ -251,7 +251,7 @@ const int num_facets = _GLIBCXX_NUM_FACETS + _GLIB _M_init_facet(new time_get); _M_init_facet(new time_put); _M_init_facet(new std::messages(__cloc, __s)); - + #ifdef _GLIBCXX_USE_WCHAR_T _M_init_facet(new std::ctype(__cloc)); _M_init_facet(new codecvt(__cloc)); @@ -289,7 +289,7 @@ const int num_facets = _GLIBCXX_NUM_FACETS + _GLIB locale::facet::_S_destroy_c_locale(__clocm); this->~_Impl(); __throw_exception_again; - } + } } void Index: libstdc++-v3/src/c++98/math_stubs_float.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/math_stubs_float.cc b/trunk/libstdc++-v3/src/c++98/math_stubs_float.cc --- a/trunk/libstdc++-v3/src/c++98/math_stubs_float.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/math_stubs_float.cc (working copy) @@ -28,7 +28,7 @@ // we use the following crude approximations. We keep saying that we'll do // better later, but never do. -extern "C" +extern "C" { #ifndef _GLIBCXX_HAVE_FABSF float Index: libstdc++-v3/src/c++98/math_stubs_long_double.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/math_stubs_long_double.cc b/trunk/libstdc++-v3/src/c++98/math_stubs_long_double.cc --- a/trunk/libstdc++-v3/src/c++98/math_stubs_long_double.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/math_stubs_long_double.cc (working copy) @@ -28,7 +28,7 @@ // we use the following crude approximations. We keep saying that we'll do // better later, but never do. -extern "C" +extern "C" { #ifndef _GLIBCXX_HAVE_FABSL long double Index: libstdc++-v3/src/c++98/misc-inst.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/misc-inst.cc b/trunk/libstdc++-v3/src/c++98/misc-inst.cc --- a/trunk/libstdc++-v3/src/c++98/misc-inst.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/misc-inst.cc (working copy) @@ -37,30 +37,30 @@ namespace std _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION // string related to iostreams - template - basic_istream& + template + basic_istream& operator>>(basic_istream&, string&); - template - basic_ostream& + template + basic_ostream& operator<<(basic_ostream&, const string&); - template - basic_istream& + template + basic_istream& getline(basic_istream&, string&, char); - template - basic_istream& + template + basic_istream& getline(basic_istream&, string&); #ifdef _GLIBCXX_USE_WCHAR_T - template - basic_istream& + template + basic_istream& operator>>(basic_istream&, wstring&); - template - basic_ostream& + template + basic_ostream& operator<<(basic_ostream&, const wstring&); - template - basic_istream& + template + basic_istream& getline(basic_istream&, wstring&, wchar_t); - template - basic_istream& + template + basic_istream& getline(basic_istream&, wstring&); #endif Index: libstdc++-v3/src/c++98/mt_allocator.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/mt_allocator.cc b/trunk/libstdc++-v3/src/c++98/mt_allocator.cc --- a/trunk/libstdc++-v3/src/c++98/mt_allocator.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/mt_allocator.cc (working copy) @@ -72,7 +72,7 @@ namespace return freelist_mutex; } - static void + static void _M_destroy_thread_key(void* __id) { // Return this thread id record to the front of thread_freelist. @@ -80,7 +80,7 @@ namespace { __gnu_cxx::__scoped_lock sentry(get_freelist_mutex()); uintptr_t _M_id = reinterpret_cast(__id); - + typedef __gnu_cxx::__pool::_Thread_record _Thread_record; _Thread_record* __tr = &freelist._M_thread_freelist_array[_M_id - 1]; __tr->_M_next = freelist._M_thread_freelist; @@ -124,13 +124,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION char* __c = __p - _M_get_align(); _Block_record* __block = reinterpret_cast<_Block_record*>(__c); - + // Single threaded application - return to global pool. __block->_M_next = __bin._M_first[0]; __bin._M_first[0] = __block; } - char* + char* __pool::_M_reserve_block(size_t __bytes, const size_t __thread_id) { // Round up to power of 2 and figure out which bin to use. @@ -137,10 +137,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const size_t __which = _M_binmap[__bytes]; _Bin_record& __bin = _M_bin[__which]; const _Tune& __options = _M_get_options(); - const size_t __bin_size = (__options._M_min_bin << __which) + const size_t __bin_size = (__options._M_min_bin << __which) + __options._M_align; size_t __block_count = __options._M_chunk_size - sizeof(_Block_address); - __block_count /= __bin_size; + __block_count /= __bin_size; // Get a new block dynamically, set it up for use. void* __v = ::operator new(__options._M_chunk_size); @@ -174,12 +174,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // _M_force_new must not change after the first allocate(), which // in turn calls this method, so if it's false, it's false forever // and we don't need to return here ever again. - if (_M_options._M_force_new) + if (_M_options._M_force_new) { _M_init = true; return; } - + // Create the bins. // Calculate the number of bins required based on _M_max_bytes. // _M_bin_size is statically-initialized to one. @@ -189,7 +189,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __bin_size <<= 1; ++_M_bin_size; } - + // Setup the bin map for quick lookup of the relevant bin. const size_t __j = (_M_options._M_max_bytes + 1) * sizeof(_Binmap_type); _M_binmap = static_cast<_Binmap_type*>(::operator new(__j)); @@ -205,7 +205,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } *__bp++ = __bint; } - + // Initialize _M_bin and its members. void* __v = ::operator new(sizeof(_Bin_record) * _M_bin_size); _M_bin = static_cast<_Bin_record*>(__v); @@ -220,7 +220,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_init = true; } - + #ifdef __GTHREADS void __pool::_M_destroy() throw() @@ -279,7 +279,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // in order to avoid too much contention we wait until the // number of records is "high enough". const size_t __thread_id = _M_get_thread_id(); - const _Tune& __options = _M_get_options(); + const _Tune& __options = _M_get_options(); const size_t __limit = (100 * (_M_bin_size - __which) * __options._M_freelist_headroom); @@ -319,7 +319,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __tmp = __tmp->_M_next; __bin._M_first[__thread_id] = __tmp->_M_next; __bin._M_free[__thread_id] -= __removed; - + __gthread_mutex_lock(__bin._M_mutex); __tmp->_M_next = __bin._M_first[0]; __bin._M_first[0] = __first; @@ -336,7 +336,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __block->_M_next = __bin._M_first[__thread_id]; __bin._M_first[__thread_id] = __block; - + ++__bin._M_free[__thread_id]; } else @@ -348,7 +348,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } } - char* + char* __pool::_M_reserve_block(size_t __bytes, const size_t __thread_id) { // Round up to power of 2 and figure out which bin to use. @@ -357,13 +357,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const size_t __bin_size = ((__options._M_min_bin << __which) + __options._M_align); size_t __block_count = __options._M_chunk_size - sizeof(_Block_address); - __block_count /= __bin_size; - + __block_count /= __bin_size; + // Are we using threads? // - Yes, check if there are free blocks on the global // list. If so, grab up to __block_count blocks in one - // lock and change ownership. If the global list is - // empty, we allocate a new chunk and add those blocks + // lock and change ownership. If the global list is + // empty, we allocate a new chunk and add those blocks // directly to our own freelist (with us as owner). // - No, all operations are made directly to global pool 0 // no need to lock or change ownership but check for free @@ -449,7 +449,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } __block->_M_next = 0; } - + __block = __bin._M_first[__thread_id]; __bin._M_first[__thread_id] = __block->_M_next; @@ -471,7 +471,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // _M_force_new must not change after the first allocate(), // which in turn calls this method, so if it's false, it's false // forever and we don't need to return here ever again. - if (_M_options._M_force_new) + if (_M_options._M_force_new) { _M_init = true; return; @@ -486,7 +486,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __bin_size <<= 1; ++_M_bin_size; } - + // Setup the bin map for quick lookup of the relevant bin. const size_t __j = (_M_options._M_max_bytes + 1) * sizeof(_Binmap_type); _M_binmap = static_cast<_Binmap_type*>(::operator new(__j)); @@ -502,11 +502,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } *__bp++ = __bint; } - + // Initialize _M_bin and its members. void* __v = ::operator new(sizeof(_Bin_record) * _M_bin_size); _M_bin = static_cast<_Bin_record*>(__v); - + // If __gthread_active_p() create and initialize the list of // free thread ids. Single threaded applications use thread id 0 // directly and have no need for this. @@ -577,7 +577,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { _Bin_record& __bin = _M_bin[__n]; __v = ::operator new(sizeof(_Block_record*) * __max_threads); - std::memset(__v, 0, sizeof(_Block_record*) * __max_threads); + std::memset(__v, 0, sizeof(_Block_record*) * __max_threads); __bin._M_first = static_cast<_Block_record**>(__v); __bin._M_address = 0; @@ -592,10 +592,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION std::memset(__v, 0, (sizeof(size_t) * __max_threads + sizeof(_Atomic_word) * __max_threads)); __bin._M_used = static_cast(__v); - + __v = ::operator new(sizeof(__gthread_mutex_t)); __bin._M_mutex = static_cast<__gthread_mutex_t*>(__v); - + #ifdef __GTHREAD_MUTEX_INIT { // Do not copy a POSIX/gthr mutex once in use. @@ -656,7 +656,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } // XXX GLIBCXX_ABI Deprecated - void + void __pool::_M_destroy_thread_key(void*) throw () { } // XXX GLIBCXX_ABI Deprecated @@ -666,7 +666,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // _M_force_new must not change after the first allocate(), // which in turn calls this method, so if it's false, it's false // forever and we don't need to return here ever again. - if (_M_options._M_force_new) + if (_M_options._M_force_new) { _M_init = true; return; @@ -681,7 +681,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __bin_size <<= 1; ++_M_bin_size; } - + // Setup the bin map for quick lookup of the relevant bin. const size_t __j = (_M_options._M_max_bytes + 1) * sizeof(_Binmap_type); _M_binmap = static_cast<_Binmap_type*>(::operator new(__j)); @@ -697,11 +697,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } *__bp++ = __bint; } - + // Initialize _M_bin and its members. void* __v = ::operator new(sizeof(_Bin_record) * _M_bin_size); _M_bin = static_cast<_Bin_record*>(__v); - + // If __gthread_active_p() create and initialize the list of // free thread ids. Single threaded applications use thread id 0 // directly and have no need for this. @@ -737,7 +737,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { // Initialize per thread key to hold pointer to // _M_thread_freelist. - __gthread_key_create(&freelist._M_key, + __gthread_key_create(&freelist._M_key, ::_M_destroy_thread_key); freelist._M_thread_freelist = _M_thread_freelist; } @@ -780,8 +780,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __v = ::operator new(sizeof(size_t) * __max_threads); std::memset(__v, 0, sizeof(size_t) * __max_threads); __bin._M_free = static_cast(__v); - - __v = ::operator new(sizeof(size_t) * __max_threads + + + __v = ::operator new(sizeof(size_t) * __max_threads + sizeof(_Atomic_word) * __max_threads); std::memset(__v, 0, (sizeof(size_t) * __max_threads + sizeof(_Atomic_word) * __max_threads)); @@ -789,7 +789,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __v = ::operator new(sizeof(__gthread_mutex_t)); __bin._M_mutex = static_cast<__gthread_mutex_t*>(__v); - + #ifdef __GTHREAD_MUTEX_INIT { // Do not copy a POSIX/gthr mutex once in use. Index: libstdc++-v3/src/c++98/pool_allocator.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/pool_allocator.cc b/trunk/libstdc++-v3/src/c++98/pool_allocator.cc --- a/trunk/libstdc++-v3/src/c++98/pool_allocator.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/pool_allocator.cc (working copy) @@ -47,7 +47,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Definitions for __pool_alloc_base. __pool_alloc_base::_Obj* volatile* __pool_alloc_base::_M_get_free_list(size_t __bytes) throw () - { + { size_t __i = ((__bytes + (size_t)_S_align - 1) / (size_t)_S_align - 1); return _S_free_list + __i; } @@ -65,7 +65,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION char* __result; size_t __total_bytes = __n * __nobjs; size_t __bytes_left = _S_end_free - _S_start_free; - + if (__bytes_left >= __total_bytes) { __result = _S_start_free; @@ -89,7 +89,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ((_Obj*)(void*)_S_start_free)->_M_free_list_link = *__free_list; *__free_list = (_Obj*)(void*)_S_start_free; } - + size_t __bytes_to_get = (2 * __total_bytes + _M_round_up(_S_heap_size >> 4)); __try @@ -125,7 +125,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return _M_allocate_chunk(__n, __nobjs); } } - + // Returns an object of size __n, and optionally adds to "size // __n"'s free list. We assume that __n is properly aligned. We // hold the allocation lock. @@ -138,11 +138,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Obj* __result; _Obj* __current_obj; _Obj* __next_obj; - + if (__nobjs == 1) return __chunk; __free_list = _M_get_free_list(__n); - + // Build free list in chunk. __result = (_Obj*)(void*)__chunk; *__free_list = __next_obj = (_Obj*)(void*)(__chunk + __n); @@ -162,11 +162,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } __pool_alloc_base::_Obj* volatile __pool_alloc_base::_S_free_list[_S_free_list_size]; - + char* __pool_alloc_base::_S_start_free = 0; - + char* __pool_alloc_base::_S_end_free = 0; - + size_t __pool_alloc_base::_S_heap_size = 0; // Instantiations. Index: libstdc++-v3/src/c++98/strstream.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/strstream.cc b/trunk/libstdc++-v3/src/c++98/strstream.cc --- a/trunk/libstdc++-v3/src/c++98/strstream.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/strstream.cc (working copy) @@ -53,13 +53,13 @@ namespace std _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION strstreambuf::strstreambuf(streamsize initial_capacity) - : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(true), + : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(true), _M_frozen(false), _M_constant(false) { streamsize n = std::max(initial_capacity, streamsize(16)); - + char* buf = _M_alloc(n); - if (buf) + if (buf) { setp(buf, buf + n); setg(buf, buf, buf); @@ -67,13 +67,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } strstreambuf::strstreambuf(void* (*alloc_f)(size_t), void (*free_f)(void*)) - : _Base(), _M_alloc_fun(alloc_f), _M_free_fun(free_f), _M_dynamic(true), + : _Base(), _M_alloc_fun(alloc_f), _M_free_fun(free_f), _M_dynamic(true), _M_frozen(false), _M_constant(false) { streamsize n = 16; char* buf = _M_alloc(n); - if (buf) + if (buf) { setp(buf, buf + n); setg(buf, buf, buf); @@ -81,33 +81,33 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } strstreambuf::strstreambuf(char* get, streamsize n, char* put) throw () - : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), + : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), _M_frozen(false), _M_constant(false) { _M_setup(get, put, n); } strstreambuf::strstreambuf(signed char* get, streamsize n, signed char* put) throw () - : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), + : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), _M_frozen(false), _M_constant(false) { _M_setup(reinterpret_cast(get), reinterpret_cast(put), n); } - strstreambuf::strstreambuf(unsigned char* get, streamsize n, + strstreambuf::strstreambuf(unsigned char* get, streamsize n, unsigned char* put) throw () - : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), + : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), _M_frozen(false), _M_constant(false) { _M_setup(reinterpret_cast(get), reinterpret_cast(put), n); } strstreambuf::strstreambuf(const char* get, streamsize n) throw () - : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), + : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), _M_frozen(false), _M_constant(true) { _M_setup(const_cast(get), 0, n); } strstreambuf::strstreambuf(const signed char* get, streamsize n) throw () - : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), + : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), _M_frozen(false), _M_constant(true) { _M_setup(reinterpret_cast(const_cast(get)), 0, n); } strstreambuf::strstreambuf(const unsigned char* get, streamsize n) throw () - : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), + : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), _M_frozen(false), _M_constant(true) { _M_setup(reinterpret_cast(const_cast(get)), 0, n); } @@ -117,7 +117,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_free(eback()); } - void + void strstreambuf::freeze(bool frozenflag) throw () { if (_M_dynamic) @@ -124,7 +124,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_frozen = frozenflag; } - char* + char* strstreambuf::str() throw () { freeze(true); @@ -131,47 +131,47 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return eback(); } - int + int strstreambuf::pcount() const throw () { return pptr() ? pptr() - pbase() : 0; } - strstreambuf::int_type - strstreambuf::overflow(int_type c) + strstreambuf::int_type + strstreambuf::overflow(int_type c) { if (c == traits_type::eof()) return traits_type::not_eof(c); - + // Try to expand the buffer. - if (pptr() == epptr() && _M_dynamic && !_M_frozen && !_M_constant) + if (pptr() == epptr() && _M_dynamic && !_M_frozen && !_M_constant) { ptrdiff_t old_size = epptr() - pbase(); ptrdiff_t new_size = std::max(ptrdiff_t(2 * old_size), ptrdiff_t(1)); - + char* buf = _M_alloc(new_size); - if (buf) + if (buf) { memcpy(buf, pbase(), old_size); char* old_buffer = pbase(); bool reposition_get = false; ptrdiff_t old_get_offset; - if (gptr() != 0) + if (gptr() != 0) { reposition_get = true; old_get_offset = gptr() - eback(); } - + setp(buf, buf + new_size); __safe_pbump(old_size); if (reposition_get) - setg(buf, buf + old_get_offset, buf + + setg(buf, buf + old_get_offset, buf + std::max(old_get_offset, old_size)); _M_free(old_buffer); } } - - if (pptr() != epptr()) + + if (pptr() != epptr()) { *pptr() = c; pbump(1); @@ -181,22 +181,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return traits_type::eof(); } - strstreambuf::int_type + strstreambuf::int_type strstreambuf::pbackfail(int_type c) { - if (gptr() != eback()) + if (gptr() != eback()) { - if (c == _Traits::eof()) + if (c == _Traits::eof()) { gbump(-1); return _Traits::not_eof(c); } - else if (c == _Traits::to_int_type(gptr()[-1])) + else if (c == _Traits::to_int_type(gptr()[-1])) { // KLUDGE gbump(-1); return c; } - else if (!_M_constant) + else if (!_M_constant) { gbump(-1); *gptr() = c; @@ -206,12 +206,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return _Traits::eof(); } - strstreambuf::int_type + strstreambuf::int_type strstreambuf::underflow() { if (gptr() == egptr() && pptr() && pptr() > egptr()) setg(eback(), gptr(), pptr()); - + if (gptr() != egptr()) return (unsigned char) *gptr(); else @@ -223,13 +223,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return this; } strstreambuf::pos_type - strstreambuf::seekoff(off_type off, ios_base::seekdir dir, + strstreambuf::seekoff(off_type off, ios_base::seekdir dir, ios_base::openmode mode) { bool do_get = false; bool do_put = false; - if ((mode & (ios_base::in | ios_base::out)) + if ((mode & (ios_base::in | ios_base::out)) == (ios_base::in | ios_base::out) && (dir == ios_base::beg || dir == ios_base::end)) do_get = do_put = true; @@ -247,7 +247,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION char* seekhigh = epptr() ? epptr() : egptr(); off_type newoff; - switch (dir) + switch (dir) { case ios_base::beg: newoff = 0; @@ -261,25 +261,25 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION default: return pos_type(off_type(-1)); } - + off += newoff; if (off < 0 || off > seekhigh - seeklow) return pos_type(off_type(-1)); - if (do_put) + if (do_put) { - if (seeklow + off < pbase()) + if (seeklow + off < pbase()) { setp(seeklow, epptr()); __safe_pbump(off); } - else + else { setp(pbase(), epptr()); __safe_pbump(off - (pbase() - seeklow)); } } - if (do_get) + if (do_get) { if (off <= egptr() - seeklow) setg(seeklow, seeklow + off, egptr()); @@ -295,7 +295,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION strstreambuf::seekpos(pos_type pos, ios_base::openmode mode) { return seekoff(pos - pos_type(off_type(0)), ios_base::beg, mode); } - char* + char* strstreambuf::_M_alloc(size_t n) { if (_M_alloc_fun) @@ -304,7 +304,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return new char[n]; } - void + void strstreambuf::_M_free(char* p) { if (p) @@ -316,19 +316,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } } - void + void strstreambuf::_M_setup(char* get, char* put, streamsize n) throw () { - if (get) + if (get) { size_t N = n > 0 ? size_t(n) : n == 0 ? strlen(get) : size_t(INT_MAX); - - if (put) + + if (put) { setg(get, get, put); setp(put, put + N); } - else + else setg(get, get, get + N); } } @@ -351,11 +351,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION istrstream::~istrstream() { } - strstreambuf* + strstreambuf* istrstream::rdbuf() const throw () { return const_cast(&_M_buf); } - char* + char* istrstream::str() throw () { return _M_buf.str(); } @@ -364,25 +364,25 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { basic_ios::init(&_M_buf); } ostrstream::ostrstream(char* s, int n, ios_base::openmode mode) - : basic_ios(), basic_ostream(0), + : basic_ios(), basic_ostream(0), _M_buf(s, n, mode & ios_base::app ? s + strlen(s) : s) { basic_ios::init(&_M_buf); } ostrstream::~ostrstream() {} - strstreambuf* + strstreambuf* ostrstream::rdbuf() const throw () { return const_cast(&_M_buf); } - void + void ostrstream::freeze(bool freezeflag) throw () { _M_buf.freeze(freezeflag); } - char* + char* ostrstream::str() throw () { return _M_buf.str(); } - int + int ostrstream::pcount() const throw () { return _M_buf.pcount(); } @@ -391,25 +391,25 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { basic_ios::init(&_M_buf); } strstream::strstream(char* s, int n, ios_base::openmode mode) - : basic_ios(), basic_iostream(0), + : basic_ios(), basic_iostream(0), _M_buf(s, n, mode & ios_base::app ? s + strlen(s) : s) { basic_ios::init(&_M_buf); } strstream::~strstream() { } - strstreambuf* + strstreambuf* strstream::rdbuf() const throw () { return const_cast(&_M_buf); } - void + void strstream::freeze(bool freezeflag) throw () { _M_buf.freeze(freezeflag); } - int + int strstream::pcount() const throw () { return _M_buf.pcount(); } - char* + char* strstream::str() throw () { return _M_buf.str(); } Index: libstdc++-v3/src/c++98/tree.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/tree.cc b/trunk/libstdc++-v3/src/c++98/tree.cc --- a/trunk/libstdc++-v3/src/c++98/tree.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/tree.cc (working copy) @@ -59,16 +59,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _Rb_tree_node_base* local_Rb_tree_increment(_Rb_tree_node_base* __x) throw () { - if (__x->_M_right != 0) + if (__x->_M_right != 0) { __x = __x->_M_right; while (__x->_M_left != 0) __x = __x->_M_left; } - else + else { _Rb_tree_node_base* __y = __x->_M_parent; - while (__x == __y->_M_right) + while (__x == __y->_M_right) { __x = __y; __y = __y->_M_parent; @@ -94,10 +94,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static _Rb_tree_node_base* local_Rb_tree_decrement(_Rb_tree_node_base* __x) throw () { - if (__x->_M_color == _S_red + if (__x->_M_color == _S_red && __x->_M_parent->_M_parent == __x) __x = __x->_M_right; - else if (__x->_M_left != 0) + else if (__x->_M_left != 0) { _Rb_tree_node_base* __y = __x->_M_left; while (__y->_M_right != 0) @@ -104,10 +104,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __y = __y->_M_right; __x = __y; } - else + else { _Rb_tree_node_base* __y = __x->_M_parent; - while (__x == __y->_M_left) + while (__x == __y->_M_left) { __x = __y; __y = __y->_M_parent; @@ -129,8 +129,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return local_Rb_tree_decrement(const_cast<_Rb_tree_node_base*>(__x)); } - static void - local_Rb_tree_rotate_left(_Rb_tree_node_base* const __x, + static void + local_Rb_tree_rotate_left(_Rb_tree_node_base* const __x, _Rb_tree_node_base*& __root) { _Rb_tree_node_base* const __y = __x->_M_right; @@ -139,7 +139,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__y->_M_left !=0) __y->_M_left->_M_parent = __x; __y->_M_parent = __x->_M_parent; - + if (__x == __root) __root = __y; else if (__x == __x->_M_parent->_M_left) @@ -153,15 +153,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /* Static keyword was missing on _Rb_tree_rotate_left. Export the symbol for backward compatibility until next ABI change. */ - void - _Rb_tree_rotate_left(_Rb_tree_node_base* const __x, + void + _Rb_tree_rotate_left(_Rb_tree_node_base* const __x, _Rb_tree_node_base*& __root) { local_Rb_tree_rotate_left (__x, __root); } - static void - local_Rb_tree_rotate_right(_Rb_tree_node_base* const __x, + static void + local_Rb_tree_rotate_right(_Rb_tree_node_base* const __x, _Rb_tree_node_base*& __root) { _Rb_tree_node_base* const __y = __x->_M_left; @@ -184,14 +184,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /* Static keyword was missing on _Rb_tree_rotate_right Export the symbol for backward compatibility until next ABI change. */ - void - _Rb_tree_rotate_right(_Rb_tree_node_base* const __x, + void + _Rb_tree_rotate_right(_Rb_tree_node_base* const __x, _Rb_tree_node_base*& __root) { local_Rb_tree_rotate_right (__x, __root); } - void + void _Rb_tree_insert_and_rebalance(const bool __insert_left, _Rb_tree_node_base* __x, _Rb_tree_node_base* __p, @@ -229,15 +229,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __header._M_right = __x; // maintain rightmost pointing to max node } // Rebalance. - while (__x != __root - && __x->_M_parent->_M_color == _S_red) + while (__x != __root + && __x->_M_parent->_M_color == _S_red) { _Rb_tree_node_base* const __xpp = __x->_M_parent->_M_parent; - if (__x->_M_parent == __xpp->_M_left) + if (__x->_M_parent == __xpp->_M_left) { _Rb_tree_node_base* const __y = __xpp->_M_right; - if (__y && __y->_M_color == _S_red) + if (__y && __y->_M_color == _S_red) { __x->_M_parent->_M_color = _S_black; __y->_M_color = _S_black; @@ -244,9 +244,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __xpp->_M_color = _S_red; __x = __xpp; } - else + else { - if (__x == __x->_M_parent->_M_right) + if (__x == __x->_M_parent->_M_right) { __x = __x->_M_parent; local_Rb_tree_rotate_left(__x, __root); @@ -256,10 +256,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION local_Rb_tree_rotate_right(__xpp, __root); } } - else + else { _Rb_tree_node_base* const __y = __xpp->_M_left; - if (__y && __y->_M_color == _S_red) + if (__y && __y->_M_color == _S_red) { __x->_M_parent->_M_color = _S_black; __y->_M_color = _S_black; @@ -266,9 +266,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __xpp->_M_color = _S_red; __x = __xpp; } - else + else { - if (__x == __x->_M_parent->_M_left) + if (__x == __x->_M_parent->_M_left) { __x = __x->_M_parent; local_Rb_tree_rotate_right(__x, __root); @@ -283,7 +283,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } _Rb_tree_node_base* - _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, + _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, _Rb_tree_node_base& __header) throw () { _Rb_tree_node_base *& __root = __header._M_parent; @@ -298,7 +298,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION else if (__y->_M_right == 0) // __z has exactly one non-null child. y == z. __x = __y->_M_left; // __x is not null. - else + else { // __z has two non-null children. Set __y to __y = __y->_M_right; // __z's successor. __x might be null. @@ -306,12 +306,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __y = __y->_M_left; __x = __y->_M_right; } - if (__y != __z) + if (__y != __z) { // relink y in place of z. y is z's successor - __z->_M_left->_M_parent = __y; + __z->_M_left->_M_parent = __y; __y->_M_left = __z->_M_left; - if (__y != __z->_M_right) + if (__y != __z->_M_right) { __x_parent = __y->_M_parent; if (__x) __x->_M_parent = __y->_M_parent; @@ -320,12 +320,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __z->_M_right->_M_parent = __y; } else - __x_parent = __y; + __x_parent = __y; if (__root == __z) __root = __y; else if (__z->_M_parent->_M_left == __z) __z->_M_parent->_M_left = __y; - else + else __z->_M_parent->_M_right = __y; __y->_M_parent = __z->_M_parent; std::swap(__y->_M_color, __z->_M_color); @@ -332,19 +332,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __y = __z; // __y now points to node to be actually deleted } - else + else { // __y == __z __x_parent = __y->_M_parent; - if (__x) - __x->_M_parent = __y->_M_parent; + if (__x) + __x->_M_parent = __y->_M_parent; if (__root == __z) __root = __x; - else + else if (__z->_M_parent->_M_left == __z) __z->_M_parent->_M_left = __x; else __z->_M_parent->_M_right = __x; - if (__leftmost == __z) + if (__leftmost == __z) { if (__z->_M_right == 0) // __z->_M_left must be null also __leftmost = __z->_M_parent; @@ -352,22 +352,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION else __leftmost = _Rb_tree_node_base::_S_minimum(__x); } - if (__rightmost == __z) + if (__rightmost == __z) { if (__z->_M_left == 0) // __z->_M_right must be null also - __rightmost = __z->_M_parent; + __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) - { + if (__y->_M_color != _S_red) + { while (__x != __root && (__x == 0 || __x->_M_color == _S_black)) - if (__x == __x_parent->_M_left) + if (__x == __x_parent->_M_left) { _Rb_tree_node_base* __w = __x_parent->_M_right; - if (__w->_M_color == _S_red) + if (__w->_M_color == _S_red) { __w->_M_color = _S_black; __x_parent->_M_color = _S_red; @@ -374,19 +374,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION local_Rb_tree_rotate_left(__x_parent, __root); __w = __x_parent->_M_right; } - if ((__w->_M_left == 0 || + if ((__w->_M_left == 0 || __w->_M_left->_M_color == _S_black) && - (__w->_M_right == 0 || - __w->_M_right->_M_color == _S_black)) + (__w->_M_right == 0 || + __w->_M_right->_M_color == _S_black)) { __w->_M_color = _S_red; __x = __x_parent; __x_parent = __x_parent->_M_parent; - } - else + } + else { - if (__w->_M_right == 0 - || __w->_M_right->_M_color == _S_black) + if (__w->_M_right == 0 + || __w->_M_right->_M_color == _S_black) { __w->_M_left->_M_color = _S_black; __w->_M_color = _S_red; @@ -395,17 +395,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } __w->_M_color = __x_parent->_M_color; __x_parent->_M_color = _S_black; - if (__w->_M_right) + if (__w->_M_right) __w->_M_right->_M_color = _S_black; local_Rb_tree_rotate_left(__x_parent, __root); break; } - } - else - { + } + else + { // same as above, with _M_right <-> _M_left. _Rb_tree_node_base* __w = __x_parent->_M_left; - if (__w->_M_color == _S_red) + if (__w->_M_color == _S_red) { __w->_M_color = _S_black; __x_parent->_M_color = _S_red; @@ -412,18 +412,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION local_Rb_tree_rotate_right(__x_parent, __root); __w = __x_parent->_M_left; } - if ((__w->_M_right == 0 || + if ((__w->_M_right == 0 || __w->_M_right->_M_color == _S_black) && - (__w->_M_left == 0 || - __w->_M_left->_M_color == _S_black)) + (__w->_M_left == 0 || + __w->_M_left->_M_color == _S_black)) { __w->_M_color = _S_red; __x = __x_parent; __x_parent = __x_parent->_M_parent; - } - else + } + else { - if (__w->_M_left == 0 || __w->_M_left->_M_color == _S_black) + if (__w->_M_left == 0 || __w->_M_left->_M_color == _S_black) { __w->_M_right->_M_color = _S_black; __w->_M_color = _S_red; @@ -432,7 +432,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } __w->_M_color = __x_parent->_M_color; __x_parent->_M_color = _S_black; - if (__w->_M_left) + if (__w->_M_left) __w->_M_left->_M_color = _S_black; local_Rb_tree_rotate_right(__x_parent, __root); break; @@ -450,14 +450,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__node == 0) return 0; unsigned int __sum = 0; - do + do { - if (__node->_M_color == _S_black) + if (__node->_M_color == _S_black) ++__sum; - if (__node == __root) + if (__node == __root) break; __node = __node->_M_parent; - } + } while (1); return __sum; } Index: libstdc++-v3/src/c++98/valarray.cc =================================================================== diff --git a/trunk/libstdc++-v3/src/c++98/valarray.cc b/trunk/libstdc++-v3/src/c++98/valarray.cc --- a/trunk/libstdc++-v3/src/c++98/valarray.cc (revision 235544) +++ b/trunk/libstdc++-v3/src/c++98/valarray.cc (working copy) @@ -35,10 +35,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Some explicit instantiations. template void __valarray_fill(size_t* __restrict__, size_t, const size_t&); - + template void __valarray_copy(const size_t* __restrict__, size_t, size_t* __restrict__); - + template valarray::valarray(size_t); template valarray::valarray(const valarray&); template valarray::~valarray(); @@ -55,7 +55,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION valarray& __t = const_cast&>(__a); return __valarray_product(&__t[0], &__t[0] + __n); } - + // Map a gslice, described by its multidimensional LENGTHS // and corresponding STRIDES, to a linear array of INDEXES // for the purpose of indexing a flat, one-dimensional array @@ -96,12 +96,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } } } - + gslice::_Indexer::_Indexer(size_t __o, const valarray& __l, const valarray& __s) : _M_count(1), _M_start(__o), _M_size(__l), _M_stride(__s), _M_index(__l.size() == 0 ? 0 : __valarray_product(__l)) - { __gslice_to_index(__o, __l, __s, _M_index); } + { __gslice_to_index(__o, __l, __s, _M_index); } _GLIBCXX_END_NAMESPACE_VERSION } // namespace Index: libstdc++-v3/src/filesystem/Makefile.am =================================================================== diff --git a/trunk/libstdc++-v3/src/filesystem/Makefile.am b/trunk/libstdc++-v3/src/filesystem/Makefile.am --- a/trunk/libstdc++-v3/src/filesystem/Makefile.am (revision 235544) +++ b/trunk/libstdc++-v3/src/filesystem/Makefile.am (working copy) @@ -73,7 +73,7 @@ AM_MAKEFLAGS = \ # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to # attempt to infer which configuration to use. -# +# # The second tag argument, `--tag disable-shared` means that libtool # only compiles each source once, for static objects. In actuality, # glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to Index: libstdc++-v3/src/filesystem/Makefile.in =================================================================== diff --git a/trunk/libstdc++-v3/src/filesystem/Makefile.in b/trunk/libstdc++-v3/src/filesystem/Makefile.in --- a/trunk/libstdc++-v3/src/filesystem/Makefile.in (revision 235544) +++ b/trunk/libstdc++-v3/src/filesystem/Makefile.in (working copy) @@ -337,9 +337,9 @@ PWD_COMMAND = $${PWDCMD-pwd} STAMP = echo timestamp > toolexecdir = $(glibcxx_toolexecdir) toolexeclibdir = $(glibcxx_toolexeclibdir) -@ENABLE_WERROR_FALSE@WERROR_FLAG = +@ENABLE_WERROR_FALSE@WERROR_FLAG = @ENABLE_WERROR_TRUE@WERROR_FLAG = $(WERROR) -@ENABLE_EXTERN_TEMPLATE_FALSE@XTEMPLATE_FLAGS = +@ENABLE_EXTERN_TEMPLATE_FALSE@XTEMPLATE_FLAGS = @ENABLE_EXTERN_TEMPLATE_TRUE@XTEMPLATE_FLAGS = -fno-implicit-templates # These bits are all figured out from configure. Look in acinclude.m4 @@ -348,14 +348,14 @@ CONFIG_CXXFLAGS = \ $(SECTION_FLAGS) $(HWCAP_FLAGS) -frandom-seed=$@ WARN_CXXFLAGS = \ - $(WARN_FLAGS) $(WERROR_FLAG) -fdiagnostics-show-location=once + $(WARN_FLAGS) $(WERROR_FLAG) -fdiagnostics-show-location=once # -I/-D flags to pass when compiling. AM_CPPFLAGS = $(GLIBCXX_INCLUDES) $(CPPFLAGS) toolexeclib_LTLIBRARIES = libstdc++fs.la -headers = -@ENABLE_DUAL_ABI_FALSE@cxx11_abi_sources = +headers = +@ENABLE_DUAL_ABI_FALSE@cxx11_abi_sources = @ENABLE_DUAL_ABI_TRUE@cxx11_abi_sources = \ @ENABLE_DUAL_ABI_TRUE@ cow-dir.cc \ @ENABLE_DUAL_ABI_TRUE@ cow-ops.cc \ @@ -399,7 +399,7 @@ AM_MAKEFLAGS = \ # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to # attempt to infer which configuration to use. -# +# # The second tag argument, `--tag disable-shared` means that libtool # only compiles each source once, for static objects. In actuality, # glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to @@ -501,7 +501,7 @@ clean-toolexeclibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libstdc++fs.la: $(libstdc__fs_la_OBJECTS) $(libstdc__fs_la_DEPENDENCIES) $(EXTRA_libstdc__fs_la_DEPENDENCIES) +libstdc++fs.la: $(libstdc__fs_la_OBJECTS) $(libstdc__fs_la_DEPENDENCIES) $(EXTRA_libstdc__fs_la_DEPENDENCIES) $(CXXLINK) -rpath $(toolexeclibdir) $(libstdc__fs_la_OBJECTS) $(libstdc__fs_la_LIBADD) $(LIBS) mostlyclean-compile: