diff options
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r-- | libstdc++-v3/src/Makefile.am | 5 | ||||
-rw-r--r-- | libstdc++-v3/src/Makefile.in | 8 | ||||
-rw-r--r-- | libstdc++-v3/src/c++11/Makefile.am | 7 | ||||
-rw-r--r-- | libstdc++-v3/src/c++11/Makefile.in | 13 | ||||
-rw-r--r-- | libstdc++-v3/src/c++11/debug.cc | 16 | ||||
-rw-r--r-- | libstdc++-v3/src/c++11/functexcept.cc | 2 | ||||
-rw-r--r-- | libstdc++-v3/src/c++11/hashtable_c++0x.cc | 1 | ||||
-rw-r--r-- | libstdc++-v3/src/c++11/regex.cc | 3 | ||||
-rw-r--r-- | libstdc++-v3/src/c++98/Makefile.am | 7 | ||||
-rw-r--r-- | libstdc++-v3/src/c++98/Makefile.in | 13 | ||||
-rw-r--r-- | libstdc++-v3/src/c++98/compatibility.cc | 19 |
11 files changed, 64 insertions, 30 deletions
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index 3e11aa39ba4..c3c6ab77e7a 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -73,7 +73,6 @@ libstdc___la_LDFLAGS = \ libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) - # Use special rules for compatibility-ldbl.cc compilation, as we need to # pass -mlong-double-64. if GLIBCXX_LDBL_COMPAT @@ -138,7 +137,7 @@ compatibility-condvar.o: compatibility-condvar.cc # as the occasion calls for it. AM_CXXFLAGS = \ $(glibcxx_compiler_pic_flag) \ - $(XTEMPLATE_FLAGS) \ + $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) # Libtool notes @@ -185,9 +184,9 @@ CXXLINK = \ $(LIBTOOL) --tag CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXX) \ + $(VTV_CXXLINKFLAGS) \ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ - # Symbol versioning for shared libraries. if ENABLE_SYMVERS libstdc++-symbols.ver: ${glibcxx_srcdir}/$(SYMVER_FILE) \ diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index a8c164fc37b..90db4544d04 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -254,6 +254,9 @@ SYMVER_FILE = @SYMVER_FILE@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +VTV_CXXFLAGS = @VTV_CXXFLAGS@ +VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ +VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ WARN_FLAGS = @WARN_FLAGS@ WERROR = @WERROR@ XMLLINT = @XMLLINT@ @@ -350,6 +353,8 @@ toolexecdir = $(glibcxx_toolexecdir) toolexeclibdir = $(glibcxx_toolexeclibdir) @ENABLE_WERROR_FALSE@WERROR_FLAG = @ENABLE_WERROR_TRUE@WERROR_FLAG = $(WERROR) +@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 # or configure.ac to see how they are set. See GLIBCXX_EXPORT_FLAGS. @@ -431,7 +436,7 @@ libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) # as the occasion calls for it. AM_CXXFLAGS = \ $(glibcxx_compiler_pic_flag) \ - $(XTEMPLATE_FLAGS) \ + $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) @@ -479,6 +484,7 @@ CXXLINK = \ $(LIBTOOL) --tag CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXX) \ + $(VTV_CXXLINKFLAGS) \ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ @ENABLE_SYMVERS_TRUE@CLEANFILES = libstdc++-symbols.ver $(version_dep) diff --git a/libstdc++-v3/src/c++11/Makefile.am b/libstdc++-v3/src/c++11/Makefile.am index e7b48acef46..58d3025f0e7 100644 --- a/libstdc++-v3/src/c++11/Makefile.am +++ b/libstdc++-v3/src/c++11/Makefile.am @@ -46,13 +46,13 @@ sources = \ thread.cc if ENABLE_EXTERN_TEMPLATE -XTEMPLATE_FLAGS = -fno-implicit-templates +# XTEMPLATE_FLAGS = -fno-implicit-templates inst_sources = \ fstream-inst.cc \ string-inst.cc \ wstring-inst.cc else -XTEMPLATE_FLAGS = +# XTEMPLATE_FLAGS = inst_sources = endif @@ -75,7 +75,7 @@ hashtable_c++0x.o: hashtable_c++0x.cc AM_CXXFLAGS = \ -std=gnu++11 \ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ - $(XTEMPLATE_FLAGS) \ + $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) AM_MAKEFLAGS = \ @@ -125,4 +125,5 @@ CXXLINK = \ $(LIBTOOL) --tag CXX --tag disable-shared \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXX) \ + $(VTV_CXXLINKFLAGS) \ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ diff --git a/libstdc++-v3/src/c++11/Makefile.in b/libstdc++-v3/src/c++11/Makefile.in index 4e3f5dc5535..37f96731435 100644 --- a/libstdc++-v3/src/c++11/Makefile.in +++ b/libstdc++-v3/src/c++11/Makefile.in @@ -214,6 +214,9 @@ SYMVER_FILE = @SYMVER_FILE@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +VTV_CXXFLAGS = @VTV_CXXFLAGS@ +VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ +VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ WARN_FLAGS = @WARN_FLAGS@ WERROR = @WERROR@ XMLLINT = @XMLLINT@ @@ -310,6 +313,8 @@ toolexecdir = $(glibcxx_toolexecdir) toolexeclibdir = $(glibcxx_toolexeclibdir) @ENABLE_WERROR_FALSE@WERROR_FLAG = @ENABLE_WERROR_TRUE@WERROR_FLAG = $(WERROR) +@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 # or configure.ac to see how they are set. See GLIBCXX_EXPORT_FLAGS. @@ -344,9 +349,10 @@ sources = \ system_error.cc \ thread.cc -@ENABLE_EXTERN_TEMPLATE_FALSE@XTEMPLATE_FLAGS = -@ENABLE_EXTERN_TEMPLATE_TRUE@XTEMPLATE_FLAGS = -fno-implicit-templates +# XTEMPLATE_FLAGS = @ENABLE_EXTERN_TEMPLATE_FALSE@inst_sources = + +# XTEMPLATE_FLAGS = -fno-implicit-templates @ENABLE_EXTERN_TEMPLATE_TRUE@inst_sources = \ @ENABLE_EXTERN_TEMPLATE_TRUE@ fstream-inst.cc \ @ENABLE_EXTERN_TEMPLATE_TRUE@ string-inst.cc \ @@ -362,7 +368,7 @@ libc__11convenience_la_SOURCES = $(sources) $(inst_sources) AM_CXXFLAGS = \ -std=gnu++11 \ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ - $(XTEMPLATE_FLAGS) \ + $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) AM_MAKEFLAGS = \ @@ -413,6 +419,7 @@ CXXLINK = \ $(LIBTOOL) --tag CXX --tag disable-shared \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXX) \ + $(VTV_CXXLINKFLAGS) \ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ all: all-am diff --git a/libstdc++-v3/src/c++11/debug.cc b/libstdc++-v3/src/c++11/debug.cc index 3655f392f7a..260009c1172 100644 --- a/libstdc++-v3/src/c++11/debug.cc +++ b/libstdc++-v3/src/c++11/debug.cc @@ -181,7 +181,8 @@ namespace __gnu_debug "attempt to access container with out-of-bounds bucket index %2;," " container only holds %3; buckets", "load factor shall be positive", - "allocators must be equal" + "allocators must be equal", + "attempt to insert with an iterator range [%1.name;, %2.name;) from this container" }; void @@ -695,7 +696,7 @@ namespace __gnu_debug } __formatter->_M_format_word(__buf, __bufsize, "@ 0x%p\n", - _M_variant._M_sequence._M_address); + _M_variant._M_iterator._M_sequence); __formatter->_M_print_word(__buf); } __formatter->_M_print_word("}\n"); @@ -808,8 +809,11 @@ namespace __gnu_debug if (__length == 0) return; - if ((_M_column + __length < _M_max_length) - || (__length >= _M_max_length && _M_column == 1)) + size_t __visual_length + = __word[__length - 1] == '\n' ? __length - 1 : __length; + if (__visual_length == 0 + || (_M_column + __visual_length < _M_max_length) + || (__visual_length >= _M_max_length && _M_column == 1)) { // If this isn't the first line, indent if (_M_column == 1 && !_M_first_line) @@ -823,17 +827,17 @@ namespace __gnu_debug } fprintf(stderr, "%s", __word); - _M_column += __length; if (__word[__length - 1] == '\n') { _M_first_line = false; _M_column = 1; } + else + _M_column += __length; } else { - _M_column = 1; _M_print_word("\n"); _M_print_word(__word); } diff --git a/libstdc++-v3/src/c++11/functexcept.cc b/libstdc++-v3/src/c++11/functexcept.cc index b74be7dce00..b0c1804ae04 100644 --- a/libstdc++-v3/src/c++11/functexcept.cc +++ b/libstdc++-v3/src/c++11/functexcept.cc @@ -30,7 +30,7 @@ #include <system_error> #include <future> #include <functional> -#include <regex> +#include <bits/regex_error.h> #ifdef _GLIBCXX_USE_NLS # include <libintl.h> diff --git a/libstdc++-v3/src/c++11/hashtable_c++0x.cc b/libstdc++-v3/src/c++11/hashtable_c++0x.cc index bddb7ff338b..e7e6b1643c2 100644 --- a/libstdc++-v3/src/c++11/hashtable_c++0x.cc +++ b/libstdc++-v3/src/c++11/hashtable_c++0x.cc @@ -29,6 +29,7 @@ #include <initializer_list> #include <tuple> #include <ext/aligned_buffer.h> +#include <ext/alloc_traits.h> #include <bits/hashtable_policy.h> namespace std _GLIBCXX_VISIBILITY(default) diff --git a/libstdc++-v3/src/c++11/regex.cc b/libstdc++-v3/src/c++11/regex.cc index b18afe2081a..bf863009041 100644 --- a/libstdc++-v3/src/c++11/regex.cc +++ b/libstdc++-v3/src/c++11/regex.cc @@ -22,7 +22,8 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. -#include <regex> +#include <stdexcept> +#include <bits/regex_error.h> namespace std _GLIBCXX_VISIBILITY(default) { diff --git a/libstdc++-v3/src/c++98/Makefile.am b/libstdc++-v3/src/c++98/Makefile.am index 2f33b964af9..8ebff1aff23 100644 --- a/libstdc++-v3/src/c++98/Makefile.am +++ b/libstdc++-v3/src/c++98/Makefile.am @@ -82,7 +82,7 @@ basic_file.cc: ${glibcxx_srcdir}/$(BASIC_FILE_CC) if ENABLE_EXTERN_TEMPLATE -XTEMPLATE_FLAGS = -fno-implicit-templates +# XTEMPLATE_FLAGS = -fno-implicit-templates inst_sources = \ allocator-inst.cc \ concept-inst.cc \ @@ -97,7 +97,7 @@ inst_sources = \ streambuf-inst.cc \ wlocale-inst.cc else -XTEMPLATE_FLAGS = +# XTEMPLATE_FLAGS = inst_sources = endif @@ -172,7 +172,7 @@ parallel_settings.o: parallel_settings.cc # as the occasion calls for it. AM_CXXFLAGS = \ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ - $(XTEMPLATE_FLAGS) \ + $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) AM_MAKEFLAGS = \ @@ -222,4 +222,5 @@ CXXLINK = \ $(LIBTOOL) --tag CXX --tag disable-shared \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXX) \ + $(VTV_CXXLINKFLAGS) \ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ diff --git a/libstdc++-v3/src/c++98/Makefile.in b/libstdc++-v3/src/c++98/Makefile.in index 42a08cd9eab..747bfa688ba 100644 --- a/libstdc++-v3/src/c++98/Makefile.in +++ b/libstdc++-v3/src/c++98/Makefile.in @@ -230,6 +230,9 @@ SYMVER_FILE = @SYMVER_FILE@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +VTV_CXXFLAGS = @VTV_CXXFLAGS@ +VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ +VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ WARN_FLAGS = @WARN_FLAGS@ WERROR = @WERROR@ XMLLINT = @XMLLINT@ @@ -326,6 +329,8 @@ toolexecdir = $(glibcxx_toolexecdir) toolexeclibdir = $(glibcxx_toolexeclibdir) @ENABLE_WERROR_FALSE@WERROR_FLAG = @ENABLE_WERROR_TRUE@WERROR_FLAG = $(WERROR) +@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 # or configure.ac to see how they are set. See GLIBCXX_EXPORT_FLAGS. @@ -364,9 +369,10 @@ host_sources_extra = \ basic_file.cc c++locale.cc \ ${inst_sources} ${parallel_sources} -@ENABLE_EXTERN_TEMPLATE_FALSE@XTEMPLATE_FLAGS = -@ENABLE_EXTERN_TEMPLATE_TRUE@XTEMPLATE_FLAGS = -fno-implicit-templates +# XTEMPLATE_FLAGS = @ENABLE_EXTERN_TEMPLATE_FALSE@inst_sources = + +# XTEMPLATE_FLAGS = -fno-implicit-templates @ENABLE_EXTERN_TEMPLATE_TRUE@inst_sources = \ @ENABLE_EXTERN_TEMPLATE_TRUE@ allocator-inst.cc \ @ENABLE_EXTERN_TEMPLATE_TRUE@ concept-inst.cc \ @@ -434,7 +440,7 @@ PARALLEL_FLAGS = -D_GLIBCXX_PARALLEL # as the occasion calls for it. AM_CXXFLAGS = \ $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ - $(XTEMPLATE_FLAGS) \ + $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \ $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) AM_MAKEFLAGS = \ @@ -485,6 +491,7 @@ CXXLINK = \ $(LIBTOOL) --tag CXX --tag disable-shared \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXX) \ + $(VTV_CXXLINKFLAGS) \ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ all: all-am diff --git a/libstdc++-v3/src/c++98/compatibility.cc b/libstdc++-v3/src/c++98/compatibility.cc index d964e89db4c..3f21c581ec1 100644 --- a/libstdc++-v3/src/c++98/compatibility.cc +++ b/libstdc++-v3/src/c++98/compatibility.cc @@ -517,14 +517,21 @@ extern __attribute__((used, weak)) const char _ZTSe[2] = "e"; extern __attribute__((used, weak)) const char _ZTSPe[3] = "Pe"; extern __attribute__((used, weak)) const char _ZTSPKe[4] = "PKe"; extern __attribute__((used, weak)) const void * const _ZTIe[2] - = { (void *) &_ZTVN10__cxxabiv123__fundamental_type_infoE[2], - (void *) _ZTSe }; + = { reinterpret_cast<const void *> + (&_ZTVN10__cxxabiv123__fundamental_type_infoE[2]), + reinterpret_cast<const void *>(_ZTSe) }; extern __attribute__((used, weak)) const void * const _ZTIPe[4] - = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2], - (void *) _ZTSPe, (void *) 0L, (void *) _ZTIe }; + = { reinterpret_cast<const void *> + (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]), + reinterpret_cast<const void *>(_ZTSPe), + reinterpret_cast<const void *>(0L), + reinterpret_cast<const void *>(_ZTIe) }; extern __attribute__((used, weak)) const void * const _ZTIPKe[4] - = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2], - (void *) _ZTSPKe, (void *) 1L, (void *) _ZTIe }; + = { reinterpret_cast<const void *> + (&_ZTVN10__cxxabiv119__pointer_type_infoE[2]), + reinterpret_cast<const void *>(_ZTSPKe), + reinterpret_cast<const void *>(1L), + reinterpret_cast<const void *>(_ZTIe) }; #endif // _GLIBCXX_LONG_DOUBLE_COMPAT #ifdef _GLIBCXX_SYMVER_DARWIN |