aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/python
AgeCommit message (Collapse)AuthorFilesLines
2015-05-13libstdc++: Bump to automake 1.11.6Michael Haubenwallner1-12/+47
2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com> * Makefile.in: Regenerated with automake-1.11.6. * aclocal.m4: Likewise. * configure: Likewise. * doc/Makefile.in: Likewise. * include/Makefile.in: Likewise. * libsupc++/Makefile.in: Likewise. * po/Makefile.in: Likewise. * python/Makefile.in: Likewise. * src/Makefile.in: Likewise. * src/c++11/Makefile.in: Likewise. * src/c++98/Makefile.in: Likewise. * src/filesystem/Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. From-SVN: r223125
2015-05-01fs_path.h (path::_List): Use vector instead of list.Jonathan Wakely1-9/+44
* include/experimental/fs_path.h (path::_List): Use vector instead of list. * python/libstdcxx/v6/printers.py (StdExpPathPrinter): Adapt. * src/filesystem/path.cc: Use std::prev instead of decrementing rvalues. Fix whitespace. * testsuite/experimental/filesystem/path/decompose/parent_path.cc: Do not decrement iterators before begin. From-SVN: r222702
2015-04-30Implement N4100 File System TSJonathan Wakely1-0/+21
* acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Define. (GLIBCXX_CHECK_FILESYSTEM_DEPS): Define. * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Enable filesystem TS and check its dependencies. * include/Makefile.am: Add new headers. * include/Makefile.in: Regenerate. * include/bits/locale_conv.h (__do_str_code_cvt, __str_codecvt_in, __str_codecvt_out): Move code conversion logic from wstring_convert into new global functions. (wstring_convert::to_bytes, wstring_convert::from_bytes): Use new functions. (wstring_convert::_M_conv): Remove. * include/bits/quoted_string.h (_Quoted_string): Split out of iomanip. * include/experimental/filesystem: New. * include/experimental/fs_dir.h: New. * include/experimental/fs_fwd.h: New. * include/experimental/fs_ops.h: New. * include/experimental/fs_path.h: New. * include/std/iomanip (_Quoted_string): Move to bits/quoted_string.h. * python/libstdcxx/v6/printers.py (StdExpPathPrinter): Add. * src/Makefile.am (SUBDIRS): Add filesystem. * src/Makefile.in: Regenerate. * src/filesystem/Makefile.am: New. * src/filesystem/Makefile.in: New. * src/filesystem/dir.cc: New. * src/filesystem/ops.cc: New. * src/filesystem/path.cc: New. * testsuite/experimental/filesystem/operations/absolute.cc: New. * testsuite/experimental/filesystem/operations/copy.cc: New. * testsuite/experimental/filesystem/operations/current_path.cc: New. * testsuite/experimental/filesystem/path/append/path.cc: New. * testsuite/experimental/filesystem/path/assign/assign.cc: New. * testsuite/experimental/filesystem/path/assign/copy.cc: New. * testsuite/experimental/filesystem/path/compare/compare.cc: New. * testsuite/experimental/filesystem/path/compare/path.cc: New. * testsuite/experimental/filesystem/path/compare/strings.cc: New. * testsuite/experimental/filesystem/path/concat/path.cc: New. * testsuite/experimental/filesystem/path/concat/strings.cc: New. * testsuite/experimental/filesystem/path/construct/copy.cc: New. * testsuite/experimental/filesystem/path/construct/default.cc: New. * testsuite/experimental/filesystem/path/construct/locale.cc: New. * testsuite/experimental/filesystem/path/construct/range.cc: New. * testsuite/experimental/filesystem/path/decompose/extension.cc: New. * testsuite/experimental/filesystem/path/decompose/filename.cc: New. * testsuite/experimental/filesystem/path/decompose/parent_path.cc: New. * testsuite/experimental/filesystem/path/decompose/relative_path.cc: New. * testsuite/experimental/filesystem/path/decompose/root_directory.cc: New. * testsuite/experimental/filesystem/path/decompose/root_name.cc: New. * testsuite/experimental/filesystem/path/decompose/root_path.cc: New. * testsuite/experimental/filesystem/path/decompose/stem.cc: New. * testsuite/experimental/filesystem/path/generic/generic_string.cc: New. * testsuite/experimental/filesystem/path/itr/traversal.cc: New. * testsuite/experimental/filesystem/path/modifiers/clear.cc: New. * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc: New. * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc: New. * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc: New. * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc: New. * testsuite/experimental/filesystem/path/modifiers/swap.cc: New. * testsuite/experimental/filesystem/path/nonmember/hash_value.cc: New. * testsuite/experimental/filesystem/path/query/empty.cc: New. * testsuite/experimental/filesystem/path/query/has_extension.cc: New. * testsuite/experimental/filesystem/path/query/has_filename.cc: New. * testsuite/experimental/filesystem/path/query/has_parent_path.cc: New. * testsuite/experimental/filesystem/path/query/has_relative_path.cc: New. * testsuite/experimental/filesystem/path/query/has_root_directory.cc: New. * testsuite/experimental/filesystem/path/query/has_root_name.cc: New. * testsuite/experimental/filesystem/path/query/has_root_path.cc: New. * testsuite/experimental/filesystem/path/query/has_stem.cc: New. * testsuite/experimental/filesystem/path/query/is_relative.cc: New. * testsuite/util/testsuite_fs.h: New. From-SVN: r222654
2015-04-29re PR libstdc++/65839 (xmethods need updating once gdb decides how to fix 18285)Doug Evans1-21/+114
PR libstdc++/65839 * python/libstdcxx/v6/xmethods.py (get_bool_type): New function. Replace all lookups of "bool" with this. (get_std_size_type): New function. Replace all lookups of std::size_t with this. (*Worker): New method get_result_type. (DequeWorkerBase.__init__): New arg val_type. All callers updated. (ListWorkerBase.__init__): New arg val_type. All callers updated. (UniquePtrGetWorker.__init__): New arg elem_type. All callers updated. Delete setting of name, enabled. (UniquePtrDerefWorker.__init__): New arg elem_type. All callers updated. Delete setting of name. (UniquePtrMethodsMatcher): Rewrite for consistency with all other libstdc++ xmethod matchers. * testsuite/libstdc++-xmethods/array.cc: Add whatis tests. * testsuite/libstdc++-xmethods/associative-containers.cc: Ditto. * testsuite/libstdc++-xmethods/deque.cc: Ditto. * testsuite/libstdc++-xmethods/forwardlist.cc: Ditto. * testsuite/libstdc++-xmethods/list.cc: Ditto. * testsuite/libstdc++-xmethods/unique_ptr.cc: Ditto. * testsuite/libstdc++-xmethods/vector.cc: Ditto. From-SVN: r222599
2015-04-29Use consistent naming for value type attributes.Doug Evans1-27/+27
* python/libstdcxx/v6/xmethods.py (ArrayWorkerBase): Rename _valtype to _val_type. (ArraySizeWorker, ArrayEmptyWorker): Ditto. (ArrayFrontWorker, ArrayBackWorker): Ditto. (ArrayAtWorker, ArraySubscriptWorker): Ditto. (DequeWorkerBase): Rename elemtype to val_type. (ForwardListWorkerBase): Rename _elem_type to _val_type. (ForwardListFrontWorker): Ditto. And rename elem_address to val_address. (ForwardListMethodsMatcher): Rename elem_type to val_type. (VectorWorkerBase): Rename _elemtype to _val_type. From-SVN: r222596
2015-02-28re PR libstdc++/65246 (libstdc++ pretty printers don't work anymore with ↵Matthias Klose1-2/+2
Python3) 2015-02-28 Matthias Klose <doko@ubuntu.com> PR libstdc++/65246 * python/libstdcxx/v6/__init__.py: Use explicit relative imports. From-SVN: r221076
2015-02-20re PR libstdc++/64695 (FAIL: libstdc++-prettyprinters/cxx11.cc)Jonathan Wakely1-8/+21
PR libstdc++/64695 * python/libstdcxx/v6/printers.py (StdTuplePrinter): Handle new tuple layout. From-SVN: r220871
2015-01-05Update copyright years.Jakub Jelinek5-5/+5
From-SVN: r219188
2014-12-19New std::string implementation.Jonathan Wakely2-6/+14
* acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_CXX11_ABI): Remove. (GLIBCXX_ENABLE_LIBSTDCXX_DUAL_ABI, GLIBCXX_DEFAULT_ABI): Add. * configure.ac: Use new macros. * configure: Regenerate. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * include/Makefile.am: Set _GLIBCXX_USE_DUAL_ABI. * include/Makefile.in: Regenerate. * config/abi/pre/gnu.ver: Export symbols related to new std::string. Tighten old patterns to not match new symbols. * config/locale/generic/monetary_members.cc: Guard some definitions to not compile with new ABI. * config/locale/gnu/monetary_members.cc: Likewise. * config/locale/gnu/numeric_members.cc: Prevent double-free. * config/os/gnu-linux/ldbl-extra.ver: Add new __gnu_cxx_ldbl128 exports. Tighten old patterns. * doc/xml/manual/configure.xml: Document new configure options. * doc/html/*: Regenerate. * include/bits/basic_string.h (__cxx11::basic_string): Define new non-reference-counted implementation in inline namespace __cxx11. (stoi, stol, stoll, stof, stod, stold, to_string): Conditionally use inline namespace. (literals::string_literals::operator"): Conditionally use abi-tag. * include/bits/basic_string.tcc (__cxx11::basic_string): Define. * include/bits/c++config: Define _GLIBCXX_USE_DUAL_ABI and LDBL_CXX11_ABI namespace macros. * include/bits/locale_classes.h (locale::name()): Use abi_tag when new ABI is in use. (locale::_S_twinned_facets): New static member. (locale::facet::__shim): Declare new type. (locale::_facet::_M_sso_shim, locale::_facet::_M_cow_shim): New functions for creating shims. (locale::_Impl::_M_facet_unchecked): New member function for use during construction. (locale::_Impl::_M_init_extra): New member functions to create second version of some facets. (collate, collate_byname): Use abi_tag when new ABI is in use. * include/bits/locale_facets.h: Add _GLIBCXX_NUM_CXX11_FACETS macro. (numpunct, numpunct_byname): Use __cxx11 namespace. (num_get::_M_extract_float, num_get::_M_extract_int): Use abi_tag when new ABI is in use. (num_get::__do_get, num_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets.tcc (num_get, num_put): Use abi_tag on definitions. (numpunct, numpunct_byname): Qualify explicit instantiations. * include/bits/locale_facets_nonio.h (time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new inline namespace macros. (money_get::__do_get, money_put::__do_put): Do not declare long double compat functions for new ABI. * include/bits/locale_facets_nonio.tcc (money_get, money_put): Use new namespace macros. (money_get::__do_get, money_put::__do_put): Do not define for new ABI. * include/bits/localefwd.h (numpunct, numpunct_byname, collate, collate_byname, time_get, time_get_byname, moneypunct, moneypunct_byname, money_get, money_put, messages, messages_byname): Use new namespace macros. * include/bits/regex.h: Use inline namespace macros. * include/bits/stl_list.h (_List_base, list): Use inline namespace instead of abi-tag. * include/bits/stringfwd.h (basic_string): Use namespace macros. * include/std/iosfwd (basic_stringbuf, basic_istringstream, basic_ostringstream, basic_stringstream): Likewise. * include/std/sstream: Likewise. (basic_stringbuf::__xfer_bufptrs): Update streambuf pointers on move. * include/std/stdexcept (__cow_string, __sso_string): New types for indirectly using std::string with either ABI. (logic_error, runtime_error): Replace std::string member with __cow_string when new ABI is in use. Declare non-inline copy constructor and assignment operator. Declare const char* constructors. (domain_error, invalid_argument, length_error, out_of_range, range_error, overflow_error, underflow_error): Declare const char* constructors. * include/std/system_error (error_category): Replace with new definition in inline namespace _V2. (error_code::message, error_condition::message): Use abi_tag on functions returning std::string. * python/libstdcxx/v6/printers.py (StdStringPrinter): Handle new ABI. * src/c++11/Makefile.am: Add new files. * src/c++11/Makefile.in: Regenerate. * src/c++11/compatibility-c++0x.cc: Compile with old std::string ABI. Define old error_category symbols. * src/c++11/cow-fstream-inst.cc: New. Instantiate fstream members using old std::string ABI. * src/c++11/cow-locale_init.cc (locale::_Impl::_M_init_extra): Define. * src/c++11/cow-shim_facets.cc: Define shim facets using old ABI. * src/c++11/cow-sstream-inst.cc: Instantiate stringstreams using old std::string ABI. * src/c++11/cow-stdexcept.cc: Define new constructors and assignment operators. (__cow_string, error_category::_M_message): Define. * src/c++11/cow-string-inst.cc: Explicit instantiations using old std::string. Include src/c++98/istream-string.cc. * src/c++11/cow-wstring-inst.cc: Explicit instantiations using old std::wstring. * src/c++11/cxx11-hash_tr1.cc: Explicit instantiations using new string. * src/c++11/cxx11-ios_failure.cc: Add sanity check. * src/c++11/cxx11-locale-inst.cc: Instantiate facets using new std::string. * src/c++11/cxx11-shim_facets.cc: Define shim facets using new ABI. * src/c++11/cxx11-stdexcept.cc: Define constructors taking new std::string. * src/c++11/cxx11-wlocale-inst.cc: Instantiate facets using new std::wstring. * src/c++11/fstream-inst.cc: Compile with new ABI. * src/c++11/functexcept.cc: Compile with old ABI. * src/c++11/random.cc: Compile with new ABI. * src/c++11/sstream-inst.cc: Compile with new ABI. * src/c++11/string-inst.cc: Explicit instantiations for new string. * src/c++11/system_error.cc (__sso_string, error_category::_M_message): Define. * src/c++11/wstring-inst.cc: Compile with new ABI. * src/c++98/Makefile.am: Compile some host files twice for old and new std::string. Add new files. * src/c++98/Makefile.in: Regenerate. * src/c++98/compatibility-ldbl.cc: Compile with old ABI. * src/c++98/compatibility.cc: Likewise. * src/c++98/concept-inst.cc: Likewise. * src/c++98/hash_tr1.cc: Likewise. * src/c++98/istream-string.cc: New file defining functions that work with istream and std::string moved from ... * src/c++98/istream.cc: ... here. * src/c++98/cow-istream-string.cc: Recompile istream-string.cc with old ABI. * src/c++98/locale-inst.cc: Adjust facet instantiations to work for either ABI. * src/c++98/locale.cc (locale::_M_install_facet, locale::_M_install_cache): Handle twinned facets. * src/c++98/locale-facets.cc: Compile with old std::string ABI. (__verify_grouping): Define new overload and old std::string version. * src/c++98/locale_init.cc: Initialize twinned facets. * src/c++98/localename.cc: Likewise. * src/c++98/misc-inst.cc: Instantiate C++98-only std::string members. (__verify_grouping): Define new std::string version. * src/c++98/stdexcept.cc: Compile with old std::string ABI. * src/c++98/wlocale-inst.cc: Likewise. * testsuite/18_support/50594.cc: Adjust to work with SSO strings. * testsuite/21_strings/basic_string/capacity/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/18654.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/2.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Likewise. * testsuite/21_strings/headers/string/synopsis.cc: Use inline namespace macros. * testsuite/23_containers/headers/list/synopsis.cc: Likewise. * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Set dg-options so correct exception type can be caught. * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/char/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise. * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/ios_base/storage/2.cc: Likewise. * testsuite/27_io/ios_base/failure/cxx11.cc: Disable for old ABI. * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error. * testsuite/libstdc++-prettyprinters/libfundts.cc: Use old ABI. * testsuite/libstdc++-prettyprinters/simple.cc: Likewise. * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise. * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise. * testsuite/util/exception/safety.h: Adjust member function types for new std::string. * testsuite/util/testsuite_abi.cc: Add new version and ignore __float128 symbols in __cxx11 namespace. From-SVN: r218964
2014-11-11xmethods.py: Add xmethods for associative containers.Siva Chandra Reddy1-0/+60
2014-11-11 Siva Chandra Reddy <sivachandra@google.com> * python/libstdcxx/v6/xmethods.py: Add xmethods for associative containers. * testsuite/libstdc++-xmethods/associative-containers.cc: New file. From-SVN: r217344
2014-10-13xmethods.py: Add xmethods for std::array, std::deque, std::forward_list, ↵Siva Chandra Reddy1-17/+382
std::list, std::vector. 2014-10-13 Siva Chandra Reddy <sivachandra@google.com> * python/libstdcxx/v6/xmethods.py: Add xmethods for std::array, std::deque, std::forward_list, std::list, std::vector. * testsuite/libstdc++-xmethods/array.cc: New file. * testsuite/libstdc++-xmethods/deque.cc: Likewise. * testsuite/libstdc++-xmethods/forwardlist.cc: Likewise. * testsuite/libstdc++-xmethods/list.cc: Likewise. * testsuite/libstdc++-xmethods/vector.cc: Add tests. From-SVN: r216145
2014-10-01printers.py (StdDebugIteratorPrinter.to_string): Adapt to latest ↵François Dumont1-1/+1
modifications on debug iterators. 2014-10-01 François Dumont <fdumont@gcc.gnu.org> * python/libstdcxx/v6/printers.py (StdDebugIteratorPrinter.to_string): Adapt to latest modifications on debug iterators. From-SVN: r215775
2014-09-30hook.in: Only import libstdcxx.v6.Siva Chandra Reddy2-15/+32
2014-09-30 Siva Chandra Reddy <sivachandra@google.com> * python/hook.in: Only import libstdcxx.v6. * python/libstdcxx/v6/__init__.py: Load printers and xmethods. From-SVN: r215726
2014-09-10hook.in: Load the xmethods.Siva Chandra Reddy4-0/+117
2014-09-10 Siva Chandra Reddy <sivachandra@google.com> * python/hook.in: Load the xmethods. * python/Makefile.am (nobase_python_DATA): Add xmethods.py. * python/Makefile.in: Regenerated. * python/libstdcxx/v6/xmethods.py: New file. * testsuite/lib/gdb-test.exp (gdb_version_check_xmethods): New function. (gdb-test): New optional argument LOAD_XMETHODS. Load xmethods python script if LOAD_XMETHODS is true. * testsuite/libstdc++-xmethods/unique_ptr.cc: New file. * testsuite/libstdc++-xmethods/vector.cc: New file. * testsuite/libstdc++-xmethods/xmethods.exp: New file. From-SVN: r215128
2014-07-29* python/libstdcxx/v6/printers.pyJonathan Wakely1-2/+2
(SingleObjContainerPrinter._contained): Use compatibility mixin. From-SVN: r213227
2014-07-23printers.py (StdExpAnyPrinter): Convert type to string instead of using ↵Jonathan Wakely1-1/+1
gdb.Type.name attribute. * python/libstdcxx/v6/printers.py (StdExpAnyPrinter): Convert type to string instead of using gdb.Type.name attribute. From-SVN: r212929
2014-07-18re PR libstdc++/61835 (Invalid comment on pretty printers breaks gdb)Jonathan Wakely1-1/+4
PR libstdc++/61835 * python/libstdcxx/v6/printers.py (TemplateTypePrinter): Use raw string. (SingleObjContainerPrinter): Check if type printers are in use. From-SVN: r212822
2014-07-15printers.py (SingleObjContainerPrinter): New base class for ↵Jonathan Wakely1-2/+129
experimental::any and experimental::optional printers. * python/libstdcxx/v6/printers.py (SingleObjContainerPrinter): New base class for experimental::any and experimental::optional printers. (StdExpAnyPrinter, StdExpOptionalPrinter, StdExpStringViewPrinter): New printers for Fundamentals TS types. * testsuite/libstdc++-prettyprinters/libfundts.cc: New. From-SVN: r212556
2014-07-15printers.py (TemplateTypePrinter): Add type printer for class templates.Jonathan Wakely1-0/+101
* python/libstdcxx/v6/printers.py (TemplateTypePrinter): Add type printer for class templates. (register_type_printers): Use TemplateTypePrinter for containers and other class templates with default template arguments. * testsuite/libstdc++-prettyprinters/whatis.cc: Test new recognizers. From-SVN: r212555
2014-07-11re PR libstdc++/58962 (Pretty printers use obsolete Python syntax)Samuel Bronson1-33/+77
2014-07-11 Samuel Bronson <naesten@gmail.com> Matthias Klose <doko@ubuntu.com> PR libstdc++/58962 * python/libstdcxx/v6/printers.py: Port to Python 2+3 (imap): New compat function. (izip): Likewise. (Iterator): New mixin to allow writing iterators in Python 3 style regardless of which version we're running on. [Python3] (long) New compat alias for "int". * testsuite/lib/gdb-test.exp: Port to Python 2+3 (print syntax) Co-Authored-By: Matthias Klose <doko@ubuntu.com> From-SVN: r212453
2014-05-19* python/libstdcxx/v6/printers.py: Use Python3 raise syntax.Jonathan Wakely1-5/+5
From-SVN: r210625
2014-05-02re PR libstdc++/59476 (gdb pretty-printer cannot print C++11 _Rb_tree_iterator)Jonathan Wakely1-3/+22
PR libstdc++/59476 * python/libstdcxx/v6/printers.py (get_value_from_Rb_tree_node): New function to handle both C++03 and C++11 _Rb_tree_node implementations. (StdRbtreeIteratorPrinter, StdMapPrinter, StdSetPrinter): Use it. * testsuite/libstdc++-prettyprinters/simple.cc: Update comment to refer to... * testsuite/libstdc++-prettyprinters/simple11.cc: New. From-SVN: r210008
2014-01-02Update copyright years in libstdc++-v3/Richard Sandiford3-3/+3
From-SVN: r206301
2013-08-20re PR libstdc++/53477 (pretty printer fails with: Python Exception <type ↵Phil Muldoon1-0/+10
'exceptions.IndexError'> list index out of range) 2013-08-20 Phil Muldoon <pmuldoon@redhat.com> PR libstdc++/53477 http://sourceware.org/bugzilla/show_bug.cgi?id=15195 * python/libstdcxx/v6/printers.py (Printer.__call__): If a value is a reference, fetch referenced value. (RxPrinter.invoke): Ditto. * testsuite/libstdc++-prettyprinters/cxx11.cc (main): Add -O0 flag. Add referenced value tests. From-SVN: r201888
2013-08-08hashtable_policy.h (_Hashtable_alloc): New.François Dumont1-1/+1
2013-08-08 François Dumont <fdumont@gcc.gnu.org> * include/bits/hashtable_policy.h (_Hashtable_alloc): New. (_ReuseOrAllocNode, _AllocNode): Adapt to use latter rather than _Hashtable. (_Before_begin<>): Remove. * include/bits/hashtable.h (_Hashtable): Inherit from _Hashtable_alloc and adapt. Restore _M_before_begin field. * src/c++11/hashtable_c++0x.cc: Add ext/alloc_traits.h include. * python/libstdcxx/v6/printers.py (StdHashtableIterator): Adapt access to hashtable before begin. * testsuite/23_containers/unordered_set/ not_default_constructible_hash_neg.cc: Adapt dg-error line number. * testsuite/23_containers/unordered_set/instantiation_neg.cc: Likewise. From-SVN: r201592
2013-08-06Commit the vtable verification feature.Caroline Tice1-0/+5
Commit the vtable verification feature. This feature is designed to detect, at run time, if/when the vtable pointer in a C++ object has been corrupted, before allowing virtual calls through that pointer. If pointer corruption is detected, execution of the program is halted. libstdc++-v3 ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * fragment.am: Add XTEMPLATE_FLAGS. * configure.ac: Add definitions for --enable-vtable-verify. * acinclude.m4: Add --enable-vtable-verify and --disable-vtable-verify; define --enable-vtable-verify; define VTV_CXXFLAGS, VTV_PCH_CXXFLAGS and VTV_CXXLINKFLAGS. * config/abi/pre/gnu.ver: Export symbols for vtable verification. * libsupc++/Makefile.am: Define vtv_sources and add it to libsupc___la_SOURCES and libsupc__convenience_la_SOURCES. * libsupc++/vtv_stubs.cc: New file. * include/Makefile.am: Add VTV_PCH_CXXFLAGS to PCHFLAGS. * src/Makefile.am: Add VTV_CXXFLAGS to AM_CXXFLAGS; add VTV_CXXLINKFLAGS to CXXLINK. * src/c++98/Makefile.am: Comment out XTEMPLATE_FLAGS; add VTV_CXXFLAGS to AM_CXXFLAGS; add VTV_CXXXLINKFLAGS to CXXLINK. * src/C++11/Makefile.am: Ditto. * doc/xml/manual/configure.xml: Add entry for --enable-vtable-verify. * scripts/testsuite_flags.in: Add cxxvtvflags to Usage; cause cxxvtvflags to use VTV_CXXFLAGS and VTV_CXXLINKFLAGS. * testsuite/lib/libstdc++.exp: Add cxxvtvflags; add code to locate libvtv if --enable-vtable-verify was used; set cxxvtvflags; add cxxvtvflags to cxx_final. * testsuite/18_support/bad_exception/23591_thread-1.c: Add -fvtable-verify=none to compiler flags. * testsuite/17_intro/freestanding.cc: Add -fvtable-verify=none to compiler flags. * configure: Regenerated. * Makefile.in: Regenerated. * python/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * libsupc++/Makefile.in: Regenerated. * config.h.in: Regenerated. * po/Makefile.in: Regenerated. * src/Makefile.in: Regenerated. * src/c++98/Makefile.in: Regenerated. * src/c++11/Makefile.in: Regenerated. * doc/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. top level ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * configure.ac: Add target-libvtv to target_libraries; disable libvtv on non-linux systems; add target-libvtv to noconfigdirs; add libsupc++/.libs to C++ library search paths. * configure: Regenerated. * Makefile.def: Add libvtv to target_modules; make libvtv depend on libstdc++ and libgcc. * Makefile.in: Regenerated. include/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * vtv-change-permission.h: New file. contrib/ChangeLog: 2013-08-06 Caroline Tice4 <cmtice@google.com> * gcc_update: Add libvtv files. libgcc/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> config.host (extra_parts): Add vtv_start.o, vtv_end.o vtv_start_preinit.o and vtv_end_preinit.o. configure.ac: Add code to check/set enable_vtable_verify. Makefile.in: Add rules to build vtv_*.o, if enable_vtable_verify is true. vtv_start_preinit.c: New file. vtv_end_preinit.c: New file. vtv_start.c: New file. vtv_end.c: New file. configure: Regenerated. gcc/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * gcc.c (VTABLE_VERIFICATION_SPEC): New definition. (LINK_COMMAND_SPEC): Add VTABLE_VERIFICATION_SPEC. * tree-pass.h: Add pass_vtable_verify. * varasm.c (assemble_variable): Add code to properly set the comdat section and name for the .vtable_map_vars section. (assemble_vtyv_preinit_initializer): New function. (default_sectin_type_flags): Make sure .vtable_map_vars section has LINK_ONCE flag. * output.h: Add function decl for assemble_vtv_preinit_initializer. * vtable-verify.c: New file. * vtable-verify.h: New file. * flag-types.h (enum vtv_priority): Defintions for flag_vtable_verify initialiation levels. * timevar.def (TV_VTABLE_VERIFICATION): New definition. * passes.def: Insert pass_vtable_verify. * aclocal.m4: Reorder includes. * doc/invoke.texi: Add documentation for the flags -fvtable-verify=, -fvtv-debug and -fvtv-counts. * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add vtv_start*.o, as appropriate, if -fvtable-verify=... is used. (GNU_USER_TARGET_ENDFILE_SPEC): Add vtv_end*.o as appropriate, if -fvtable-verify=... is used. * Makefile.in (OBJS): Add vtable-verify.o to list. (vtable-verify.o): Add new build rule. (GTFILES): Add vtable-verify.c to list. * common.opt (fvtable-verify=): New flag. (vtv_priority): Values for fvtable-verify= flag. (fvtv-counts): New flag. (fvtv-debug): New flag. * tree.h (save_vtable_map_decl): New extern function decl. gcc/cp/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * Make-lang.in (*CXX_AND_OBJCXX_OBJS): Add vtable-class-hierarchy.o to list. (vtable-class-hierarchy.o): Add build rule. * cp-tree.h (vtv_start_verification_constructor_init_function): New extern function decl. (vtv_finish_verification_constructor_init_function): New extern function decl. (build_vtbl_address): New extern function decl. (get_mangled_vtable_map_var_name): New extern function decl. (vtv_compute_class_hierarchy_transitive_closure): New extern function decl. (vtv_generate_init_routine): New extern function decl. (vtv_save_class_info): New extern function decl. (vtv_recover_class_info): New extern function decl. (vtv_build_vtable_verify_fndecl): New extern function decl. * class.c (finish_struct_1): Add call to vtv_save_class_info if flag_vtable_verify is true. * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list. * vtable-class-hierarchy.c: New file. * mangle.c (get_mangled_vtable_map_var_name): New function. * decl2.c (start_objects): Update function comment. (cp_write_global_declarations): Call vtv_recover_class_info, vtv_compute_class_hierarchy_transitive_closure and vtv_build_vtable_verify_fndecl, before calling finalize_compilation_unit, and call vtv_generate_init_rount after, IFF flag_vtable_verify is true. (vtv_start_verification_constructor_init_function): New function. (vtv_finish_verification_constructor_init_function): New function. * init.c (build_vtbl_address): Remove static qualifier from function. libvtv/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> Initial check-in of new vtable verification feature. * configure.ac : New file. * acinclude.m4 : New file. * Makefile.am : New file. * aclocal.m4 : New file. * configure.tgt : New file. * configure: New file (generated). * Makefile.in: New file (generated). * vtv_set.h : New file. * vtv_utils.cc : New file. * vtv_utils.h : New file. * vtv_malloc.cc : New file. * vtv_rts.cc : New file. * vtv_malloc.h : New file. * vtv_rts.h : New file. * vtv_fail.cc : New file. * vtv_fail.h : New file. * vtv_map.h : New file. * scripts/run-testsuite.sh : New file. * scripts/sum-vtv-counts.c : New file. * testsuite/parts-test-main.h : New file. * testusite/dataentry.cc : New file. * testsuite/temp_deriv.cc : New file. * testsuite/register_pair.cc : New file. * testsuite/virtual_inheritance.cc : New file. * testsuite/field-test.cc : New file. * testsuite/nested_vcall_test.cc : New file. * testsuite/template-list-iostream.cc : New file. * testsuite/register_pair_inserts.cc : New file. * testsuite/register_pair_inserts_mt.cc : New file. * testsuite/event.list : New file. * testsuite/parts-test-extra-parts-views.cc : New file. * testsuite/parts-test-extra-parts-views.h : New file. * testsuite/environment-fail-32.s : New file. * testsuite/parts-test-extra-parts.h : New file. * testsuite/temp_deriv2.cc : New file. * testsuite/dlopen_mt.cc : New file. * testsuite/event.h : New file. * testsuite/template-list.cc : New file. * testsuite/replace-fail.cc : New file. * testsuite/Makefile.am : New file. * testsuite/Makefile.in: New file (generated). * testsuite/mempool_negative.c : New file. * testsuite/parts-test-main.cc : New file. * testsuite/event-private.cc : New file. * testsuite/thunk.cc : New file. * testsuite/event-defintiions.cc : New file. * testsuite/event-private.h : New file. * testsuite/parts-test.list : New file. * testusite/register_pair_mt.cc : New file. * testsuite/povray-derived.cc : New file. * testsuite/event-main.cc : New file. * testsuite/environment.cc : New file. * testsuite/template-list2.cc : New file. * testsuite/thunk_vtable_map_attack.cc : New file. * testsuite/parts-test-extra-parts.cc : New file. * testsuite/environment-fail-64.s : New file. * testsuite/dlopen.cc : New file. * testsuite/so.cc : New file. * testsuite/temp_deriv3.cc : New file. * testsuite/const_vtable.cc : New file. * testsuite/mempool_positive.c : New file. * testsuite/dup_name.cc : New file. From-SVN: r201555
2013-08-062013-08-06 Paolo Carlini <paolo.carlini@oracle.com>Paolo Carlini1-1/+1
Revert the last commit. From-SVN: r201525
2013-08-06hashtable_policy.h (_Hashtable_alloc): New.François Dumont1-1/+1
2013-08-06 François Dumont <fdumont@gcc.gnu.org> * include/bits/hashtable_policy.h (_Hashtable_alloc): New. (_ReuseOrAllocNode, _AllocNode): Adapt to use latter rather than _Hashtable. (_Before_begin<>): Remove. * include/bits/hashtable.h (_Hashtable): Inherit from _Hashtable_alloc and adapt. Restore _M_before_begin field. * python/libstdcxx/v6/printers.py (StdHashtableIterator): Adapt access to hashtable before begin. * testsuite/23_containers/unordered_set/ not_default_constructible_hash_neg.cc: Adapt dg-error line number. * testsuite/23_containers/unordered_set/instantiation_neg.cc: Likewise. From-SVN: r201522
2013-05-15printers.py (Tr1HashtableIterator): Fix rendering of std::tr1 unordered ↵François Dumont1-5/+44
containers iterator. 2013-05-15 François Dumont <fdumont@gcc.gnu.org> * python/libstdcxx/v6/printers.py (Tr1HashtableIterator): Fix rendering of std::tr1 unordered containers iterator. (StdHashtableIterator): New, render std unordered containers iterator. * testsuite/libstdc++-prettyprinters/tr1.cc: New. From-SVN: r198947
2013-02-03Update copyright in libstdc++-v3.Richard Sandiford3-3/+3
From-SVN: r195701
2012-11-16whatis.cc: New file.Tom Tromey1-0/+102
* testsuite/libstdc++-prettyprinters/whatis.cc: New file. * testsuite/lib/gdb-test.exp (whatis-test): New proc. (gdb-test): Handle 'whatis' tests. (gdb_batch_check): New proc. (gdb_version_check): Rewrite to use gdb_batch_check. * python/libstdcxx/v6/printers.py: Import gdb.types. (FilteringTypePrinter): New class. (add_one_type_printer, register_type_printers): New functions. (register_libstdcxx_printers): Call register_type_printers. From-SVN: r193573
2012-11-02printers.py (Tr1HashtableIterator): Update.Jonathan Wakely1-2/+4
* python/libstdcxx/v6/printers.py (Tr1HashtableIterator): Update. (StdForwardListPrinter): Likewise. From-SVN: r193087
2012-10-28re PR libstdc++/55041 (prettyprinting/shared_ptr & cxx11 fails on some ↵Jonathan Wakely1-4/+14
platforms) PR libstdc++/55041 * python/libstdcxx/v6/printers.py (Tr1UnorderedMapPrinter): Update to handle hashtable as member of unordered_map not base class. (Tr1UnorderedSetPrinter): Likewise. From-SVN: r192894
2012-10-15gthr.m4: New.Pavel Chupin1-1/+3
* config/gthr.m4: New. Define GCC_AC_THREAD_HEADER. * libgcc/configure: Regenerate. * libgcc/configure.ac: Replace code with GCC_AC_THREAD_HEADER use. * libstdc++-v3/Makefile.in: Regenerate. * libstdc++-v3/acinclude.m4: Replace code with GCC_AC_THREAD_HEADER use. * libstdc++-v3/configure: Regenerate. * libstdc++-v3/doc/Makefile.in: Regenerate. * libstdc++-v3/include/Makefile.am: Regenerate. * libstdc++-v3/include/Makefile.in: Rename variable. * libstdc++-v3/libsupc++/Makefile.in: Regenerate. * libstdc++-v3/po/Makefile.in: Regenerate. * libstdc++-v3/python/Makefile.in: Regenerate. * libstdc++-v3/src/Makefile.in: Regenerate. * libstdc++-v3/src/c++11/Makefile.in: Regenerate. * libstdc++-v3/src/c++98/Makefile.in: Regenerate. * libstdc++-v3/testsuite/Makefile.in: Regenerate. From-SVN: r192458
2012-10-12Revert r192297.Kirill Yukhin1-1/+0
From-SVN: r192394
2012-10-10Fix missing gthr-default.h issue on separate libstdc++ configurePavel Chupin1-0/+1
Fix missing gthr-default.h issue on separate libstdc++ configure * libstdc++-v3/acinclude.m4: Define glibcxx_thread_h. * libstdc++-v3/include/Makefile.am: Use glibcxx_thread_h. * libstdc++-v3/Makefile.in: Regenerate. * libstdc++-v3/configure: Regenerate. * libstdc++-v3/doc/Makefile.in: Regenerate. * libstdc++-v3/include/Makefile.in: Regenerate. * libstdc++-v3/libsupc++/Makefile.in: Regenerate. * libstdc++-v3/po/Makefile.in: Regenerate. * libstdc++-v3/python/Makefile.in: Regenerate. * libstdc++-v3/src/Makefile.in: Regenerate. * libstdc++-v3/src/c++11/Makefile.in: Regenerate. * libstdc++-v3/src/c++98/Makefile.in: Regenerate. * libstdc++-v3/testsuite/Makefile.in: Regenerate. From-SVN: r192297
2012-09-29fragment.am (CONFIG_CXXFLAGS): Remove EXTRA_CXX_FLAGS.Benjamin Kosnik1-1/+1
2012-09-28 Benjamin Kosnik <bkoz@redhat.com> * fragment.am (CONFIG_CXXFLAGS): Remove EXTRA_CXX_FLAGS. * libsupc++/Makefile.am (LTCXXCOMPILE): Add EXTRA_CXX_FLAGS here. * src/Makefile.am: Same. * src/c++98/Makefile.am: Same. * src/c++11/Makefile.am: Same. * Makefile.in: Regenerated. * src/Makefile.am: Same. * src/c++11/Makefile.in: Same. * src/c++98/Makefile.in: Same. * include/Makefile.in: Same. * po/Makefile.in: Same. * python/Makefile.in: Same. * testsuite/Makefile.in: Same. 2012-09-28 Benjamin Kosnik <bkoz@redhat.com> * src/c++98/Makefile.am: Fixup PARALLEL_FLAGS. From-SVN: r191847
2012-09-28acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): Remove ENABLE_PARALLEL.Benjamin Kosnik1-47/+12
2012-09-28 Benjamin Kosnik <bkoz@redhat.com> * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): Remove ENABLE_PARALLEL. * include/Makefile.am: Same. * src/c++98/Makefile.am: Same. * src/Makefile.am: Same. * Makefile.in: Regenerated. * aclocal.m4: Same. * configure: Same. * doc/Makefile.in: Same. * include/Makefile.in: Same. * libsupc++/Makefile.in: Same. * po/Makefile.in: Same. * python/Makefile.in: Same. * src/Makefile.in: Same. * testsuite/Makefile.in: Same. * src/c++11/Makefile.in: Same. * src/c++98/Makefile.in: Same. * src/c++98/compatibility-debug_list-2.cc: Update comments. * src/c++98/compatibility-debug_list.cc: Same. * src/c++98/compatibility-list-2.cc: Renamed to src/c++98/list-aux-2.cc * src/c++98/compatibility-list.cc: Renamed to src/c++98/list-aux.cc * src/c++98/compatibility-parallel_list-2.cc: Renamed to src/c++98/list_associated-2.cc. * src/c++98/compatibility-parallel_list.cc: Renamed to src/c++98/list_associated.cc. From-SVN: r191837
2012-09-26Optimize bulk mode for normal_distribution<double> for SSE3.Ulrich Drepper1-12/+48
2012-09-26 Ulrich Drepper <drepper@gmail.com> Optimize bulk mode for normal_distribution<double> for SSE3. * configure.host: Define cpu_opt_bits_random. * configure.ac: Substitute CPU_OPT_BITS_RANDOM. * include/Makefile.am (bits_headers): Add ${bits_host_headers}. (bits_host_headers): Define. * include/bits/random.tcc: Move __details::_Power_of_2 to... * include/bits/random.h: ...here. * include/std/random: Include <bits/opt_random.h>. * config/cpu/i486/opt/bits/opt_random.h: New file. * config/cpu/generic/opt/bits/opt_random.h: New file. * configure: Regenerated. * Makefile.in: Regenerated. * aclocal.m4: Regenerated. * doc/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * libsupc++/Makefile.in: Regenerated. * po/Makefile.in: Regenerated. * python/Makefile.in: Regenerated. * src/Makefile.in: Regenerated. * src/c++11/Makefile.in: Regenerated. * src/c++98/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. * config/cpu/generic/opt/ext/opt_random.h: Fix comment. From-SVN: r191758
2012-09-20re PR libstdc++/28811 (--with-pic vs static libraries and libstdc++)Benjamin Kosnik1-21/+13
2012-09-18 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/28811 PR libstdc++/54482 * configure.ac (glibcxx_lt_pic_flag, glibcxx_compiler_pic_flag, glibcxx_compiler_shared_flag): New. Use them. (lt_prog_compiler_pic_CXX): Set via glibcxx_*_flag(s) above. (pic_mode): Set to default. (PIC_CXXFLAGS): Remove. * Makefile.am (PICFLAG, PICFLAG_FOR_TARGET): Remove. Comment. * libsupc++/Makefile.am: Use glibcxx_ld_pic_flag and glibcxx_compiler_shared_flag. Comment. * src/c++11/Makefile.am: Same. * src/c++98/Makefile.am: Same. * src/Makefile.am: Use glibcxx_compiler_pic_flag. * Makefile.in: Regenerated. * aclocal.m4: Same. * configure: Same. * doc/Makefile.in: Same. * include/Makefile.in: Same. * libsupc++/Makefile.in: Same. * po/Makefile.in: Same. * python/Makefile.in: Same. * src/Makefile.in: Same. * src/c++11/Makefile.in: Same. * src/c++98/Makefile.in: Same. * testsuite/Makefile.in: Same. * src/c++11/compatibility-atomic-c++0x.cc: Use _GLIBCXX_SHARED instead of PIC to designate shared-only code blocks. * src/c++11/compatibility-c++0x.cc: Same. * src/c++11/compatibility-thread-c++0x.cc: Same. * src/c++98/compatibility-list-2.cc: Same. * src/c++98/compatibility.cc: : Same. * testsuite/17_intro/shared_with_static_deps.cc: New. * doc/xml/manual/build_hacking.xml: Separate configure from make/build issues, add build details. From-SVN: r191509
2012-09-17configure.ac: Substitute CPU_OPT_EXT_RANDOM.Ulrich Drepper1-10/+21
* configure.ac: Substitute CPU_OPT_EXT_RANDOM. * configure.host: Define cpu_opt_ext_random to location of the optimized version of <ext/random>. * include/Makefile.am (ext_headers): Add ${ext_host_headers}. (ext_host_headers): Define. * include/ext/random (simd_fast_mersenne_twister_engine<> ::operator==): Don't define function here. * include/ext/random.tcc (simd_fast_mersenne_twister_engine): Don't define code using SSE2 here. Define generic code only if _GLIBCXX_OPT_HAVE_RANDOM_SFMT_GEN_READ is not defined. (simd_fast_mersenne_twister_engine<> ::operator==): Define here if _GLIBCXX_OPT_HAVE_RANDOM_SFMT_OPERATOREQUAL is not defined. * config/cpu/generic/opt/ext/opt_random.h: New file. * config/cpu/i486/opt/ext/opt_random.h: New file. * libsupc++/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. * po/Makefile.in: Regenerated. * configure: Regenerated. * Makefile.in: Regenerated. * doc/Makefile.in: Regenerated. * aclocal.m4: Regenerated. * python/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * src/c++98/Makefile.in: Regenerated. * src/c++11/Makefile.in: Regenerated. * src/Makefile.in: Regenerated. From-SVN: r191384
2012-09-12Clear hardware capabilities on libstdc++.so with Sun asRainer Orth1-1/+2
* acinclude.m4 (GLIBCXX_CHECK_ASSEMBLER_HWCAP): Define. * configure.ac: Call GLIBCXX_CHECK_ASSEMBLER_HWCAP. * fragment.am (CONFIG_CXXFLAGS): Add $(HWCAP_FLAGS). * configure: Regenerate. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * python/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * src/c++11/Makefile.in: Regenerate. * src/c++98/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. From-SVN: r191218
2012-08-15cxx11.cc (struct datum): New.Tom Tromey1-1/+3
* testsuite/libstdc++-prettyprinters/cxx11.cc (struct datum): New. (global): New global. (main): Add test for unique_ptr. * python/libstdcxx/v6/printers.py (UniquePointerPrinter.to_string): Extract the pointer and also print its type. From-SVN: r190417
2012-04-13unordered_map.h (__unordered_map): Remove.Benjamin Kosnik1-1/+1
2012-04-12 Benjamin Kosnik <bkoz@redhat.com> * include/bits/unordered_map.h (__unordered_map): Remove. (__unordered_multimap): Remove. Add aliases for __umap_traits, __umap_hashtable, __ummap_traits, __ummap_hashtable. (unordered_map): Derive from __umap_hashtable. (unordered_multimap): Derive from __ummap_hashtable. * include/bits/unordered_set.h (__unordered_set): Remove. (__unordered_multiset): Remove. Add aliases for __uset_traits, __uset_hashtable, __umset_traits, __umset_hashtable. (unordered_set): Derive from __uset_hashtable. (unordered_multiset): Derive from __umset_hashtable. * include/bits/hashtable.h (__cache_default): New, consolidated cache defaults for _Hashtable. Adjust comments for doxygen. (_Hashtable): Consolidate bool template parameters into new, _Traits class. Inherited base classes synthesize _Hashtable in CRTP via original 10 parameters. Prefer using declarations to typedefs, add __node_type, __bucket_type, etc. Push many nested types down hierarchy to _Hashtable_base. Add constructors necessary for top-level unordered_containers. Consolidate insert member functions and logic in new base class, __detail::_Insert and __detail::_Insert_base. (_Hashtable::operator=(initializer_list)): Add. * include/bits/hashtable_policy.h: Convert to doxygen markup. (_Hashtable_traits) New. Consolidate bool template parameters here. (_Insert, _Insert_base): New, consolidated insert member functions. (_Map_base, _Equality, _Rehash_base): Adjust template parameters, use base types. (_Hashtable_base): Move type declarations useful to other base classes into this class. * python/libstdcxx/v6/printers.py (Tr1HashtableIterator): Update. * testsuite/23_containers/unordered_set/instantiation_neg.cc: Adjust traits, line numbers. From-SVN: r186403
2012-02-21re PR libstdc++/52317 (incorrect FSF address)Paolo Carlini1-6/+5
2012-02-21 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/52317 * python/Makefile.am: Update boilerplate license text to GPLv3. * include/profile/unordered_map: Likewise. * include/profile/set: Likewise. * include/profile/base.h: Likewise. * include/profile/impl/profiler_list_to_slist.h: Likewise. * include/profile/impl/profiler_container_size.h: Likewise. * include/profile/impl/profiler_vector_size.h: Likewise. * include/profile/impl/profiler_hash_func.h: Likewise. * include/profile/impl/profiler_trace.h: Likewise. * include/profile/impl/profiler_list_to_vector.h: Likewise. * include/profile/impl/profiler_vector_to_list.h: Likewise. * include/profile/impl/profiler.h: Likewise. * include/profile/impl/profiler_state.h: Likewise. * include/profile/impl/profiler_map_to_unordered_map.h: Likewise. * include/profile/impl/profiler_algos.h: Likewise. * include/profile/impl/profiler_hashtable_size.h: Likewise. * include/profile/impl/profiler_node.h: Likewise. * include/profile/vector: Likewise. * include/profile/unordered_set: Likewise. * include/profile/map.h: Likewise. * include/profile/map: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/ wchar_t/dr1261.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/ char/dr1261.cc: Likewise. * testsuite/20_util/reference_wrapper/invoke-2.cc: Likewise. From-SVN: r184430
2012-02-17re PR libstdc++/47058 ("--enable-maintainer-mode --disable-werror" wrongly ↵Benjamin Kosnik1-1/+3
upgrades warnings to errors in libstdc++) 2012-02-17 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/47058 * acinclude.m4 (GLIBCXX_ENABLE_WERROR): New. (GLIBCXX_EXPORT_FLAGS): Add -Wabi to WARN_FLAGS * configure.ac: Use it. * fragment.am: Set WERROR_FLAG conditionally on --disable-werror. * configure: Regenerate. * python/Makefile.in: Same. * Makefile.in: Same. * doc/Makefile.in: Same. * include/Makefile.in: Same. * po/Makefile.in: Same. * python/Makefile.in: Same. * src/Makefile.in: Same. * src/c++11/Makefile.in: Same. * src/c++98/Makefile.in: Same. * testsuite/Makefile.in: Same. From-SVN: r184349
2012-02-15re PR libstdc++/51368 (libstdc++ python pretty printers should use ↵Benjamin Kosnik2-2/+8
--with-python-dir just like libjava) 2012-02-15 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/51368 * acinclude.m4 (GLIBCXX_ENABLE_PYTHON): New. * configure.ac: Use it. * python/Makefile.am: Same. * configure: Regenerate. * python/Makefile.in: Regenerate. * Makefile.in: Same. * doc/Makefile.in: Same. * include/Makefile.in: Same. * po/Makefile.in: Same. * src/Makefile.in: Same. * src/c++11/Makefile.in: Same. * src/c++98/Makefile.in: Same. * testsuite/Makefile.in: Same. Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com> From-SVN: r184282
2012-02-14cxx11.cc (main): Add new tests.Tom Tromey1-26/+6
* testsuite/libstdc++-prettyprinters/cxx11.cc (main): Add new tests. * python/libstdcxx/v6/printers.py (Tr1HashtableIterator.__init__): Rewrite. (Tr1HashtableIterator.update): Remove. (Tr1HashtableIterator.next): Rewrite. From-SVN: r184233
2012-02-05re PR libstdc++/51956 ([patch] improve shared_ptr and weak_ptr ↵Jonathan Wakely1-11/+16
pretty-printers for gdb) PR libstdc++/51956 * python/libstdcxx/v6/printers.py (StdPointerPrinter): Rename to... (SharedPointerPrinter): This. Also show weak count. * testsuite/libstdc++-prettyprinters/shared_ptr.cc: New. From-SVN: r183914
2012-01-30re PR libstdc++/51649 (pretty printers don't handle std::__7:: namespace)Tom Tromey1-88/+110
PR libstdc++/51649: * testsuite/libstdc++-prettyprinters/debug.cc: New file. * testsuite/lib/gdb-test.exp (regexp-test): New proc. (note-test): Update. (gdb-test): Handle regexp tests. Add some logging. * testsuite/libstdc++-prettyprinters/simple.cc: Compile with -O0. (placeholder, use): Remove. (main): Add tests for deque, list, map, and set iterators. Add tests for slist and slist iterator. * testsuite/libstdc++-prettyprinters/48362.cc (main): Handle __7 namespace. * python/libstdcxx/v6/printers.py (StdListPrinter.children): Use the type's _Node typedef. (StdListIteratorPrinter.to_string): Change how node type is computed. (StdSlistPrinter.children): Use the type's _Node typedef. (StdSlistIteratorPrinter.to_string): Likewise. (StdRbtreeIteratorPrinter.to_string): Use the type's _Link_type typedef. (StdMapPrinter.children): Change how the node's type is computed. (StdSetPrinter.children): Likewise. (StdForwardListPrinter.children): Use the type's _Node typedef. (Printer.add_version): New method. (Printer.add_container): New method. (build_libstdcxx_dictionary): Handle __7 and __cxx1998 namespaces. (find_type): New function. From-SVN: r183732