Commit Graph

9008 Commits

Author SHA1 Message Date
Jonathan Wakely 5930d87a2d Ensure another pretty-printer test uses C++98 mode
* testsuite/libstdc++-prettyprinters/debug.cc: Add -std=gnu++98 to
	dg-options and avoid use of uniform-init.

From-SVN: r230977
2015-11-26 16:25:55 +00:00
Jonathan Wakely 43a2362b94 Ensure pretty-printer test uses C++98 mode
* testsuite/libstdc++-prettyprinters/simple.cc: Add -std=gnu++98 to
	dg-options and avoid use of uniform-init.

From-SVN: r230973
2015-11-26 15:42:47 +00:00
David Edelsohn f95207445b * configure: Regenerate.
From-SVN: r230949
2015-11-26 08:24:19 -05:00
Jonathan Wakely 75837d7b13 Improve tests for valid values of iostream bitmask types
* testsuite/27_io/ios_base/types/fmtflags/case_label.cc: Explicitly
	check minimum and maximum values, and size of underlying type.
	* testsuite/27_io/ios_base/types/iostate/case_label.cc: Likewise.
	* testsuite/27_io/ios_base/types/openmode/case_label.cc: Likewise.

From-SVN: r230868
2015-11-25 13:49:06 +00:00
Rainer Orth e5ef217c3e Port libvtv to Solaris
libstdc++-v3:
	* acinclude.m4 (GLIBCXX_ENABLE_VTABLE_VERIFY) <solaris2*>: Use
	-Wl,-R in VTV_CXXLINKFLAGS.
	* configure: Regenerate.

	* testsuite/18_support/bad_exception/23591_thread-1.c: Use
	-fvtable-verify=none on Solaris 12+.

	libgcc:
	* Makefile.in (VTV_CFLAGS): New variable.
	(vtv_start$(objext), vtv_end$(objext), vtv_end$(objext))
	(vtv_start_preinit$(objext), vtv_end_preinit$(objext)): Use it.
	* config.host (*-*-solaris2*): Add t-crtstuff-pic to tmake_file.
	Add vtv_start.o, vtv_end.o, vtv_start_preinit.o, vtv_end_preinit.o
	to extra_parts if $enable_vtable_verify = yes.

	libvtv:
	* configure.tgt (*-*-solaris2.[1-9]*): Declare supported.
	* configure.ac: Call AC_USE_SYSTEM_EXTENSIONS.
	<*-*-solaris2*>: Check for init priority support.
	Check for getexecname, __fortify_fail, _obstack_begin.
	(VTV_NO_OBSTACK): New conditional.
	* configure: Regenerate.
	* Makefile.am [VTV_NO_OBSTACK] (obstack.c): Use new condition.
	Create empty config.h
	* Makefile.in: Regenerate.

	* vtv_rts.cc [HAVE_GETEXECNAME] (program_invocation_name): New
	variable.
	(read_section_offset_and_length) [HAVE_GETEXECNAME]: Set it.
	(dl_iterate_phdr_callback) [HAVE_GETEXECNAME]: Set it.

	(__fortify_fail): Wrap in HAVE___FORTIFY_FAIL
	[!HAVE___FORTIFY_FAIL]: Provide non-Cygwin implementation.

	(read_section_offset_and_length): Assert sh_size >= VTV_PAGE_SIZE.
	(iterate_modules): Fix typo.
	Use VTV_PAGE_SIZE.
	(dl_iterate_phdr_callback): Fix typo.
	Use VTV_PAGE_SIZE.
	(__VLTChangePermission): Fix typos.

	include:
	* vtv-change-permission.h (VTV_PAGE_SIZE) [__sun__ && __svr4__ &&
	__sparc__]: Define.

	gcc:
	* config/sol2.h (SUPPORTS_INIT_PRIORITY): Move up.
	(STARTFILE_VTV_SPEC, ENDFILE_VTV_SPEC): Define.
	(STARTFILE_SPEC): Use %(startfile_vtv).
	(ENDFILE_SPEC): Use %(endfile_vtv).
	(SUBTARGET_EXTRA_SPECS): Handle STARTFILE_VTV_SPEC,
	ENDFILE_VTV_SPEC.

	* gcc.c (LINK_COMMAND_SPEC): Move VTABLE_VERIFICATION_SPEC after %{L*}.

From-SVN: r230865
2015-11-25 10:30:25 +00:00
Rainer Orth ef3a75060e Handle C++11 <math.h> overloads on Solaris 12
* acinclude.m4 (GLIBCXX_CHECK_MATH11_PROTO): New test.
	* configure.ac: Use it.
	* configure: Regenerate.
	* config.h.in: Regenerate.

	* include/c_global/cmath [__cplusplus >= 201103L]
	(std::fpclassify): Wrap in !__CORRECT_ISO_CPP11_MATH_H_PROTO.
	(std::isfinite): Likewise.
	(std::isinf): Likewise.
	(std::isnan): Likewise.
	(std::isnormal): Likewise.
	(std::signbit): Likewise.
	(std::isgreater): Likewise.
	(std::isgreaterequal): Likewise.
	(std::isless): Likewise.
	(std::islessequal): Likewise.
	(std::islessgreater): Likewise.
	(std::isunordered): Likewise.
	(std::acosh): Likewise.
	(std::asinh): Likewise.
	(std::atanh): Likewise.
	(std::cbrt): Likewise.
	(std::copysign): Likewise.
	(std::erf): Likewise.
	(std::erfc): Likewise.
	(std::exp2): Likewise.
	(std::expm1): Likewise.
	(std::fdim): Likewise.
	(std::fma): Likewise.
	(std::fmax): Likewise.
	(std::fmin): Likewise.
	(std::hypot): Likewise.
	(std::ilogb): Likewise.
	(std::lgamma): Likewise.
	(std::llrint): Likewise.
	(std::llround): Likewise.
	(std::log1p): Likewise.
	(std::log2): Likewise.
	(std::logb): Likewise.
	(std::lrint): Likewise.
	(std::lround): Likewise.
	(std::nearbyint): Likewise.
	(std::nextafter): Likewise.
	(std::nexttoward): Likewise.
	(std::remainder): Likewise.
	(std::remquo): Likewise.
	(std::rint): Likewise.
	(std::round): Likewise.
	(std::scalbln): Likewise.
	(std::scalbn): Likewise.
	(std::tgamma): Likewise.
	(std::trunc): Likewise.
	* include/tr1/cmath [_GLIBCXX_USE_C99_MATH_TR1] (std::tr1::acosh):
	Wrap in !__CORRECT_ISO_CPP11_MATH_H_PROTO.
	(std::tr1::asinh): Likewise.
	(std::tr1::atanh): Likewise.
	(std::tr1::cbrt): Likewise.
	(std::tr1::copysign): Likewise.
	(std::tr1::erf): Likewise.
	(std::tr1::erfc): Likewise.
	(std::tr1::exp2): Likewise.
	(std::tr1::expm1): Likewise.
	(std::tr1::fabs): Likewise.
	(std::tr1::fdim): Likewise.
	(std::tr1::fma): Likewise.
	(std::tr1::fmax): Likewise.
	(std::tr1::fmin): Likewise.
	(std::tr1::hypot): Likewise.
	(std::tr1::ilogb): Likewise.
	(std::tr1::lgamma): Likewise.
	(std::tr1::llrint): Likewise.
	(std::tr1::llround): Likewise.
	(std::tr1::log1p): Likewise.
	(std::tr1::log2): Likewise.
	(std::tr1::logb): Likewise.
	(std::tr1::lrint): Likewise.
	(std::tr1::lround): Likewise.
	(std::tr1::nearbyint): Likewise.
	(std::tr1::nextafter): Likewise.
	(std::tr1::nexttoward): Likewise.
	(std::tr1::remainder): Likewise.
	(std::tr1::remquo): Likewise.
	(std::tr1::rint): Likewise.
	(std::tr1::scalbln): Likewise.
	(std::tr1::scalbn): Likewise.
	(std::tr1::tgamma): Likewise.
	(std::tr1::trunc): Likewise.
	(std::tr1::pow): Likewise.

	* testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc:
	Restrict dg-xfail-if, dg-excess-errors to *-*-solaris2.1[01]*.

From-SVN: r230807
2015-11-24 13:15:43 +00:00
David Edelsohn 3b58931386 * testsuite/23_containers/vector/profile/vector.cc: Add maxdata option on AIX.
From-SVN: r230701
2015-11-21 00:38:25 -05:00
Jan Kratochvil cdccafd922 re PR libstdc++/68448 (Python Pretty Printers get disabled on libstdc++ reload by GDB)
PR libstdc++/68448
	* python/hook.in: Call register_libstdcxx_printers.
	* python/libstdcxx/v6/__init__.py: Wrap it to
	register_libstdcxx_printers.

From-SVN: r230669
2015-11-20 19:00:51 +00:00
Jonathan Wakely 5f0b7c9548 PR libstdc++/66059 optimise _Build_index_tuple
PR libstdc++/66059
	* include/std/utility (_Build_index_tuple): Optimise.

From-SVN: r230496
2015-11-17 19:54:33 +00:00
Doug Evans 46d825c59c re PR libstdc++/67440 (pretty-printing of a const set<foo> fails)
PR libstdc++/67440
	* python/libstdcxx/v6/printers.py (find_type): Handle "const" in
	type name.
	* testsuite/libstdc++-prettyprinters/debug.cc: Add test for
	const set<int>.
	* testsuite/libstdc++-prettyprinters/simple.cc: Ditto.
	* testsuite/libstdc++-prettyprinters/simple11.cc: Ditto.

From-SVN: r230437
2015-11-16 21:32:26 +00:00
Jonathan Wakely 356510acd9 PR libstdc++/68353 fix _GLIBCXX_USE_C99_WCHAR test
PR libstdc++/68353
	* include/bits/basic_string.h: Test value of _GLIBCXX_USE_C99_WCHAR
	not whether it is defined.
	* include/ext/vstring.h: Likewise.

From-SVN: r230395
2015-11-15 11:15:08 +00:00
Andreas Tobler 301d1d00e6 acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Change locale implementation from darwin to DragonFly.
2015-11-14  Andreas Tobler  <andreast@gcc.gnu.org>

    * acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Change locale implementation
    from darwin to DragonFly.
    * configure: Regenerate.
    * config/os/bsd/freebsd/ctype_configure_char.cc: Improve locale
    support, do it the same as DragonFly.
    * config/os/bsd/freebsd/os_defines.h: Add fine grained C99 defines.

From-SVN: r230383
2015-11-14 22:17:24 +01:00
Jonathan Wakely 230b4edeee Fix std::wstring capacity test for short wchar_t
* testsuite/21_strings/basic_string/capacity/char/18654.cc: Use
	real minimum capacity.
	* testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
	Likewise.

From-SVN: r230378
2015-11-14 17:24:42 +00:00
David Edelsohn bfc6afd929 * testsuite/experimental/random/randint.cc: Add dg-add-options tls.
From-SVN: r230377
2015-11-14 09:22:53 -05:00
Jonathan Wakely 5ae465c530 Define std::experimental::randint etc.
* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/experimental/random: New.
	* testsuite/experimental/random/randint.cc: New.

From-SVN: r230332
2015-11-13 16:49:40 +00:00
John Marino 4216708a00 Improve portability of named locale tests
2015-11-13  John Marino  <gnugcc@marino.st>

	* testsuite/22_locale/codecvt/always_noconv/char/wrapped_env.cc:
	Use portable locale name
	* testsuite/22_locale/codecvt/always_noconv/char/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/codecvt/always_noconv/wchar_t/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/codecvt/encoding/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/encoding/char/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/codecvt/encoding/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/codecvt/encoding/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/codecvt/in/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/in/char/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/codecvt/in/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/codecvt/in/wchar_t/wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/in/wchar_t/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/codecvt/length/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/length/char/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/codecvt/length/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/codecvt/length/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/codecvt/length/wchar_t/wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/length/wchar_t/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/codecvt/max_length/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/max_length/char/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/codecvt/max_length/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/codecvt/max_length/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/codecvt/out/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/out/char/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/codecvt/out/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/codecvt/out/wchar_t/7.cc: Likewise.
	* testsuite/22_locale/codecvt/out/wchar_t/wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/out/wchar_t/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/codecvt/unshift/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/unshift/char/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/codecvt/unshift/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/codecvt/unshift/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_env.cc: Likewise.
	* testsuite/22_locale/codecvt/unshift/wchar_t/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/codecvt_byname/50714.cc: Likewise.
	* testsuite/22_locale/collate/compare/char/1.cc: Likewise.
	* testsuite/22_locale/collate/compare/char/2.cc: Likewise.
	* testsuite/22_locale/collate/compare/char/3.cc: Likewise.
	* testsuite/22_locale/collate/compare/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/collate/compare/char/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/collate/compare/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/collate/compare/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/collate/compare/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc: Likewise.
	* testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/collate/hash/char/2.cc: Likewise.
	* testsuite/22_locale/collate/hash/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/collate/hash/char/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/collate/hash/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc: Likewise.
	* testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/collate/transform/char/2.cc: Likewise.
	* testsuite/22_locale/collate/transform/char/3.cc: Likewise.
	* testsuite/22_locale/collate/transform/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/collate/transform/char/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/collate/transform/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/collate/transform/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/collate_byname/named_equivalence.cc: Likewise.
	* testsuite/22_locale/ctype/cons/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/cons/char/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/ctype/is/char/2.cc: Likewise.
	* testsuite/22_locale/ctype/is/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/is/char/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/ctype/is/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/ctype/is/wchar_t/wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/is/wchar_t/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/ctype/narrow/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/narrow/char/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/ctype/narrow/wchar_t/wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/narrow/wchar_t/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/ctype/scan/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/scan/char/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/ctype/scan/wchar_t/wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/scan/wchar_t/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/ctype/to/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/to/char/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/ctype/to/wchar_t/wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/to/wchar_t/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/ctype/widen/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/widen/char/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/ctype/widen/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/ctype/widen/wchar_t/wrapped_env.cc: Likewise.
	* testsuite/22_locale/ctype/widen/wchar_t/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/facet/2.cc: Likewise.
	* testsuite/22_locale/locale/cons/12352.cc: Likewise.
	* testsuite/22_locale/locale/cons/12658_thread-1.cc: Likewise.
	* testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise.
	* testsuite/22_locale/locale/cons/2.cc: Likewise.
	* testsuite/22_locale/locale/cons/38365.cc: Likewise.
	* testsuite/22_locale/locale/cons/38368.cc: Likewise.
	* testsuite/22_locale/locale/cons/4.cc: Likewise.
	* testsuite/22_locale/locale/cons/40184.cc: Likewise.
	* testsuite/22_locale/locale/cons/7.cc: Likewise.
	* testsuite/22_locale/locale/global_locale_objects/14071.cc: Likewise.
	* testsuite/22_locale/locale/global_locale_objects/2.cc: Likewise.
	* testsuite/22_locale/messages/13631.cc: Likewise.
	* testsuite/22_locale/messages/members/char/1.cc: Likewise.
	* testsuite/22_locale/messages/members/char/2.cc: Likewise.
	* testsuite/22_locale/messages/members/char/3.cc: Likewise.
	* testsuite/22_locale/messages/members/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/messages/members/char/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/messages_byname/named_equivalence.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/1.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/10.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/11.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/11528.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/12.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/13.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/15.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/16.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/17.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/18.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/2.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/3.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/4.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/10.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/11.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/11528.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/12.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/13.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/15.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/16.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/17.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/18.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/4.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/wrapped_env.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/money_put/put/char/1.cc: Likewise.
	* testsuite/22_locale/money_put/put/char/2.cc: Likewise.
	* testsuite/22_locale/money_put/put/char/3.cc: Likewise.
	* testsuite/22_locale/money_put/put/char/9780-3.cc: Likewise.
	* testsuite/22_locale/money_put/put/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/money_put/put/char/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/wrapped_env.cc: Likewise.
	* testsuite/22_locale/money_put/put/wchar_t/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/moneypunct/40712.cc: Likewise.
	* testsuite/22_locale/moneypunct/members/char/2.cc: Likewise.
	* testsuite/22_locale/moneypunct/members/char/wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/moneypunct/members/char/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/moneypunct/members/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/moneypunct/members/wchar_t/wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/moneypunct/members/wchar_t/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/moneypunct_byname/named_equivalence.cc:
	Likewise.
	* testsuite/22_locale/num_get/get/char/1.cc: Likewise.
	* testsuite/22_locale/num_get/get/char/3.cc: Likewise.
	* testsuite/22_locale/num_get/get/char/5.cc: Likewise.
	* testsuite/22_locale/num_get/get/char/6.cc: Likewise.
	* testsuite/22_locale/num_get/get/char/9.cc: Likewise.
	* testsuite/22_locale/num_get/get/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/num_get/get/char/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/5.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/6.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/9.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/wrapped_env.cc: Likewise.
	* testsuite/22_locale/num_get/get/wchar_t/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/num_put/put/char/1.cc: Likewise.
	* testsuite/22_locale/num_put/put/char/20909.cc: Likewise.
	* testsuite/22_locale/num_put/put/char/20914.cc: Likewise.
	* testsuite/22_locale/num_put/put/char/3.cc: Likewise.
	* testsuite/22_locale/num_put/put/char/5.cc: Likewise.
	* testsuite/22_locale/num_put/put/char/9780-2.cc: Likewise.
	* testsuite/22_locale/num_put/put/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/num_put/put/char/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/num_put/put/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/num_put/put/wchar_t/20909.cc: Likewise.
	* testsuite/22_locale/num_put/put/wchar_t/20914.cc: Likewise.
	* testsuite/22_locale/num_put/put/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/num_put/put/wchar_t/5.cc: Likewise.
	* testsuite/22_locale/num_put/put/wchar_t/wrapped_env.cc: Likewise.
	* testsuite/22_locale/num_put/put/wchar_t/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/numpunct/members/char/2.cc: Likewise.
	* testsuite/22_locale/numpunct/members/char/3.cc: Likewise.
	* testsuite/22_locale/numpunct/members/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/numpunct/members/char/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/numpunct/members/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/numpunct/members/wchar_t/wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/numpunct/members/wchar_t/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/numpunct_byname/named_equivalence.cc: Likewise.
	* testsuite/22_locale/time_get/date_order/char/wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/time_get/date_order/char/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/time_get/date_order/wchar_t/wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/time_get/date_order/wchar_t/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/time_get/get/char/2.cc: Likewise.
	* testsuite/22_locale/time_get/get/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/time_get/get_date/char/12750.cc: Likewise.
	* testsuite/22_locale/time_get/get_date/char/2.cc: Likewise.
	* testsuite/22_locale/time_get/get_date/char/26701.cc: Likewise.
	* testsuite/22_locale/time_get/get_date/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/time_get/get_date/char/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/time_get/get_date/wchar_t/12750.cc: Likewise.
	* testsuite/22_locale/time_get/get_date/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/time_get/get_date/wchar_t/26701.cc: Likewise.
	* testsuite/22_locale/time_get/get_date/wchar_t/4.cc: Likewise.
	* testsuite/22_locale/time_get/get_date/wchar_t/wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/time_get/get_date/wchar_t/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/time_get/get_monthname/char/2.cc: Likewise.
	* testsuite/22_locale/time_get/get_monthname/char/wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/time_get/get_monthname/char/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/time_get/get_time/char/1.cc: Likewise.
	* testsuite/22_locale/time_get/get_time/char/2.cc: Likewise.
	* testsuite/22_locale/time_get/get_time/char/wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/time_get/get_time/char/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/time_get/get_time/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/time_get/get_time/wchar_t/wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/time_get/get_time/wchar_t/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/time_get/get_weekday/char/2.cc: Likewise.
	* testsuite/22_locale/time_get/get_weekday/char/38081-1.cc: Likewise.
	* testsuite/22_locale/time_get/get_weekday/char/38081-2.cc: Likewise.
	* testsuite/22_locale/time_get/get_weekday/char/wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/time_get/get_weekday/char/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/time_get/get_year/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/time_get/get_year/char/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/time_get/get_year/wchar_t/wrapped_env.cc:
	Likewise.
	* testsuite/22_locale/time_get/get_year/wchar_t/wrapped_locale.cc:
	Likewise.
	* testsuite/22_locale/time_put/put/char/17038.cc: Likewise.
	* testsuite/22_locale/time_put/put/char/2.cc: Likewise.
	* testsuite/22_locale/time_put/put/char/3.cc: Likewise.
	* testsuite/22_locale/time_put/put/char/4.cc: Likewise.
	* testsuite/22_locale/time_put/put/char/6.cc: Likewise.
	* testsuite/22_locale/time_put/put/char/7.cc: Likewise.
	* testsuite/22_locale/time_put/put/char/8.cc: Likewise.
	* testsuite/22_locale/time_put/put/char/9780-1.cc: Likewise.
	* testsuite/22_locale/time_put/put/char/wrapped_env.cc: Likewise.
	* testsuite/22_locale/time_put/put/char/wrapped_locale.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/17038.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/4.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/6.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/7.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/8.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/wrapped_env.cc: Likewise.
	* testsuite/22_locale/time_put/put/wchar_t/wrapped_locale.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/char/13007.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/char/13171-1.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/char/14975-1.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/char/2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/char/9322.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/13007.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/13171-3.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc: Likewise.
	* testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc: Likewise.
	* testsuite/27_io/basic_ios/copyfmt/char/2.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/2.cc:
	Likewise.
	* testsuite/27_io/basic_streambuf/cons/57394.cc: Likewise.
	* testsuite/27_io/basic_streambuf/imbue/char/13007-2.cc: Likewise.
	* testsuite/27_io/basic_streambuf/imbue/char/9322.cc: Likewise.
	* testsuite/27_io/basic_streambuf/imbue/wchar_t/13007-2.cc: Likewise.
	* testsuite/27_io/basic_streambuf/imbue/wchar_t/9322.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/imbue/char/9322.cc: Likewise.
	* testsuite/27_io/basic_stringbuf/imbue/wchar_t/9322.cc: Likewise.
	* testsuite/27_io/manipulators/extended/get_money/char/1.cc: Likewise.
	* testsuite/27_io/manipulators/extended/get_money/wchar_t/1.cc:
	Likewise.
	* testsuite/27_io/manipulators/extended/get_time/char/2.cc: Likewise.
	* testsuite/27_io/manipulators/extended/get_time/wchar_t/2.cc:
	Likewise.
	* testsuite/27_io/manipulators/extended/put_money/char/1.cc: Likewise.
	* testsuite/27_io/manipulators/extended/put_money/wchar_t/1.cc:
	Likewise.
	* testsuite/27_io/manipulators/extended/put_time/char/2.cc: Likewise.
	* testsuite/27_io/manipulators/extended/put_time/wchar_t/2.cc:
	Likewise.
	* testsuite/27_io/objects/wchar_t/13582-1_xin.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/9520.cc: Likewise.
	* testsuite/lib/libstdc++.exp (check_v3_target_namedlocale): Check
	for named locale as appropriate for target.
	* testsuite/util/testsuite_hooks.h (ISO_8859): Define macro to form
	target's preferred form of locale name.

From-SVN: r230329
2015-11-13 15:25:48 +00:00
Jennifer Yao 23c64853c8 More fine-grained autoconf checks for C99 library
2015-11-13  Jennifer Yao  <jenny.hyphen.fa@gmail.com>
	    Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/58393
	PR libstdc++/61580
	* acinclude.m4 (GLIBCXX_ENABLE_C99): Perform tests twice, with
	-std=c++11 as well as -std=c++98, and define separate macros for each.
	Cache the results of checking for complex math and wide character
	functions. Reformat for readability.
	* config.h.in: Regenerate.
	* include/bits/c++config: Define _GLIBCXX_USE_C99_XXX macros to
	either _GLIBCXX98_USE_C99_XXX or _GLIBCXX11_USE_C99_XXX according to
	language standard in use.
	* config/locale/dragonfly/c_locale.h (std::__convert_from_v): Replace
	_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
	* config/locale/generic/c_locale.h (std::__convert_from_v): Likewise.
	* config/locale/gnu/c_locale.h (std::__convert_from_v): Likewise.
	* config/os/bsd/dragonfly/os_defines.h: Define _GLIBCXX_USE_C99_STDIO,
	_GLIBCXX_USE_C99_STDLIB, and _GLIBCXX_USE_C99_WCHAR.
	* configure: Regenerate.
	* include/bits/basic_string.h: Make numeric conversion functions
	depend on _GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, or
	_GLIBCXX_USE_C99_WCHAR, instead of _GLIBCXX_USE_C99.
	* include/ext/vstring.h: Likewise.
	* include/bits/locale_facets.tcc (std::num_put::_M_insert_float):
	Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
	* include/bits/locale_facets_nonio.tcc (std::money_put::do_put):
	Likewise.
	* include/c_compatibility/math.h: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_MATH.
	* include/c_compatibility/wchar.h: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_WCHAR.
	* include/c_global/cstdio: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_STDIO.
	* include/c_global/cstdlib: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_STDLIB.
	* include/c_global/cwchar: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_WCHAR.
	* include/c_std/cstdio: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_STDIO.
	* include/c_std/cstdlib: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_STDLIB.
	* include/c_std/cwchar: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_WCHAR.
	* include/tr1/cstdio: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_STDIO.
	* include/tr1/cstdlib: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_STDLIB.
	* include/tr1/cwchar: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_WCHAR.
	* include/tr1/stdlib.h: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_STDLIB.
	* src/c++98/locale_facets.cc (std::__num_base::_S_format_float):
	Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
	* testsuite/18_support/exception_ptr/60612-terminate.cc: Replace
	_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB.
	* testsuite/18_support/exception_ptr/60612-unexpected.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc
	(test01): Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stof.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stoi.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stol.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stold.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stoll.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stoul.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stoull.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	to_wstring.cc: Likewise.
	* testsuite/26_numerics/headers/cstdlib/13943.cc: Replace
	_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB.
	* testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc: Likewise.
	* testsuite/lib/libstdc++.exp (check_v3_target_string_conversions):
	Change preprocessor #if conditional so that it uses
	_GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, and
	_GLIBCXX_USE_C99_WCHAR, instead of _GLIBCXX_USE_C99.
	* testsuite/tr1/8_c_compatibility/cmath/templates.cc: Replace
	_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_MATH.
	* testsuite/tr1/8_c_compatibility/cstdio/functions.cc: Replace
	_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
	* testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Replace
	_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB.
	* testsuite/tr1/8_c_compatibility/cstdlib/types_std_tr1.cc: Likewise.
	* testsuite/tr1/8_c_compatibility/cwchar/functions.cc: Replace
	_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR.
	* testsuite/util/testsuite_fs.h: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_STDIO.

Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>

From-SVN: r230324
2015-11-13 14:51:25 +00:00
Jonathan Wakely 011b25e4f5 * include/experimental/bits/shared_ptr.h: Tweak comments.
From-SVN: r230306
2015-11-13 11:30:30 +00:00
Fan You 930d560203 Implement std::experimental::shared_ptr with array support
2015-11-13  Fan You  <youfan.noey@gmail.com>
	    Jonathan Wakely  <jwakely@redhat.com>

	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/experimental/bits/shared_ptr.h: New.
	* include/experimental/memory: Include new header.
	* testsuite/experimental/memory/shared_ptr/assign/assign.cc: New.
	* testsuite/experimental/memory/shared_ptr/cast/cast.cc: New.
	* testsuite/experimental/memory/shared_ptr/comparison/comparison.cc:
	New.
	* testsuite/experimental/memory/shared_ptr/cons/alias_ctor.cc: New.
	* testsuite/experimental/memory/shared_ptr/cons/alloc_ctor.cc: New.
	* testsuite/experimental/memory/shared_ptr/cons/copy_ctor.cc: New.
	* testsuite/experimental/memory/shared_ptr/cons/copy_ctor_neg.cc: New.
	* testsuite/experimental/memory/shared_ptr/cons/default_ctor.cc: New.
	* testsuite/experimental/memory/shared_ptr/cons/move_ctor.cc: New.
	* testsuite/experimental/memory/shared_ptr/cons/pointer_ctor.cc: New.
	* testsuite/experimental/memory/shared_ptr/cons/unique_ptr_ctor.cc:
	New.
	* testsuite/experimental/memory/shared_ptr/cons/weak_ptr_ctor.cc: New.
	* testsuite/experimental/memory/shared_ptr/dest/dest.cc: New.
	* testsuite/experimental/memory/shared_ptr/modifiers/reset.cc: New.
	* testsuite/experimental/memory/shared_ptr/modifiers/swap.cc: New.
	* testsuite/experimental/memory/shared_ptr/observers/bool_conv.cc:
	New.
	* testsuite/experimental/memory/shared_ptr/observers/operators.cc:
	New.
	* testsuite/experimental/memory/shared_ptr/observers/owner_before.cc:
	New.
	* testsuite/experimental/memory/shared_ptr/observers/use_count.cc: New.

Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>

From-SVN: r230300
2015-11-13 11:05:28 +00:00
Jonathan Wakely 8014404589 Define alias templates using polymorphic memory resources
* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/experimental/memory_resource: Add feature-test macro.
	* include/experimental/regex: New.
	* include/experimental/deque: Add alias template using PMR.
	* include/experimental/forward_list: Likewise.
	* include/experimental/list: Likewise.
	* include/experimental/map: Likewise.
	* include/experimental/set: Likewise.
	* include/experimental/string: Likewise.
	* include/experimental/unordered_map: Likewise.
	* include/experimental/unordered_set: Likewise.
	* include/experimental/vector: Likewise.

From-SVN: r230295
2015-11-13 10:01:05 +00:00
Fan You bfeffbd1ae Implement C++ LFTSv1 polymorphic memory resources
2015-11-13  Fan You  <youfan.noey@gmail.com>

	* include/Makefile.am: Add new headers.
	* include/Makefile.in: Regenerate.
	* include/bits/uses_allocator.h (__erased_type): Define.
	(__uses_allocator_helper): Check for __erased_type.
	* include/experimental/memory_resource: New.
	* include/experimental/utlity: New.
	* testsuite/experimental/type_erased_allocator/1.cc: New.
	* testsuite/experimental/type_erased_allocator/1_neg.cc: New.
	* testsuite/experimental/type_erased_allocator/2.cc: New.
	* testsuite/experimental/type_erased_allocator/uses_allocator.cc: New.

From-SVN: r230294
2015-11-13 10:00:59 +00:00
Jonathan Wakely fbfae2f089 Extend valid values of iostream bitmask types
PR libstdc++/56158
	* include/bits/ios_base.h (_Ios_Fmtflags, _Ios_Openmode, _Ios_Iostate):
	Define enumerators to ensure all values of type int are valid values
	of the enumeration type.
	* testsuite/27_io/ios_base/types/fmtflags/case_label.cc: Add new cases.
	* testsuite/27_io/ios_base/types/iostate/case_label.cc: Likewise.
	* testsuite/27_io/ios_base/types/openmode/case_label.cc: Likewise.

From-SVN: r230267
2015-11-12 17:08:42 +00:00
Jonathan Wakely f022ab0310 * include/std/thread: Include <cerrno> for EINTR.
From-SVN: r230266
2015-11-12 16:13:06 +00:00
Ville Voutilainen c3a6648b1c Implement D0013R2, logical type traits.
2015-11-12  Ville Voutilainen  <ville.voutilainen@gmail.com>

	Implement D0013R2, logical type traits.

	/libstdc++-v3
	* include/experimental/type_traits (conjunction_v, disjunction_v,
	negation_v): New.
	* include/std/type_traits (conjunction, disjunction, negation):
	Likewise.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Likewise.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.
	* testsuite/experimental/type_traits/value.cc: Likewise.
	* testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc: New.
	* testsuite/20_util/logical_traits/requirements/typedefs.cc: Likewise.
	* testsuite/20_util/logical_traits/value.cc: Likewise.

	/testsuite
	* g++.dg/cpp0x/Wattributes1.C: Adjust.

From-SVN: r230258
2015-11-12 15:56:31 +02:00
Jonathan Wakely 53dc6fb862 * include/experimental/bits/string_view.tcc: Fix doxygen @file.
From-SVN: r230221
2015-11-12 10:08:49 +00:00
Jonathan Wakely c5bd8d521a * libsupc++/new_handler.cc: Fix for explicit constructor change.
From-SVN: r230184
2015-11-11 17:29:39 +00:00
Jonathan Wakely f55e699d3d Loop in std::this_thread sleep functions
PR libstdc++/60421
	* include/std/thread (this_thread::sleep_for): Retry on EINTR.
	(this_thread::sleep_until): Retry if time not reached.
	* src/c++11/thread.cc (__sleep_for): Retry on EINTR.
	* testsuite/30_threads/this_thread/60421.cc: Test interruption and
	non-steady clocks.

From-SVN: r230183
2015-11-11 17:08:51 +00:00
Ville Voutilainen e3907f12a5 Correct the Changelog date of the previous commit.
From-SVN: r230177
2015-11-11 16:56:17 +02:00
Ville Voutilainen 269fa2a91b LWG 2510, make the default constructors of library tag types explicit.
2015-11-10  Ville Voutilainen  <ville.voutilainen@gmail.com>

	LWG 2510, make the default constructors of library tag types
	explicit.
	* include/bits/mutex.h (defer_lock_t, try_lock_t,
	adopt_lock_t): Add an explicit default constructor.
	* include/bits/stl_pair.h (piecewise_construct_t): Likewise.
	* include/bits/uses_allocator.h (allocator_arg_t): Likewise.
	* libsupc++/new (nothrow_t): Likewise.
	* testsuite/17_intro/tag_type_explicit_ctor.cc: New.

From-SVN: r230175
2015-11-11 16:47:19 +02:00
Jonathan Wakely 832ca6ac72 re PR libstdc++/64651 (std::rethrow_exception not found by ADL)
PR libstdc++/64651
	* libsupc++/exception_ptr.h (rethrow_exception): Add using-declaration
	to __exception_ptr namespace.
	* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test ADL.
	Remove unnecessary test variables.

From-SVN: r230147
2015-11-11 10:08:23 +00:00
Jonathan Wakely d4a9dffbaa Fix return type of heterogeneous find for sets
PR libstdc++/68190
	* include/bits/stl_multiset.h (multiset::find): Fix return types.
	* include/bits/stl_set.h (set::find): Likewise.
	* testsuite/23_containers/map/operations/2.cc: Test find return types.
	* testsuite/23_containers/multimap/operations/2.cc: Likewise.
	* testsuite/23_containers/multiset/operations/2.cc: Likewise.
	* testsuite/23_containers/set/operations/2.cc: Likewise.

From-SVN: r230113
2015-11-10 15:12:24 +00:00
Jonathan Wakely 60baa1883c Update C++17 library implementation status
* doc/xml/manual/status_cxx2017.xml: Update.
	* doc/html/*: Regenerate.

From-SVN: r230108
2015-11-10 14:05:01 +00:00
Jonathan Wakely fb9333352b * include/bits/functional_hash.h: Fix grammar in comment.
From-SVN: r230097
2015-11-10 11:12:33 +00:00
François Dumont ec494945a9 2015-11-09 François Dumont <fdumont@gcc.gnu.org>
* include/bits/stl_algo.h
	(partial_sort_copy): Instantiate std::iterator_traits only if concept
	checks.
	(lower_bound): Likewise.
	(upper_bound): Likewise.
	(equal_range): Likewise.
	(binary_search): Likewise.
	* include/bits/stl_heap.h (pop_heap): Likewise.

From-SVN: r230052
2015-11-09 21:10:18 +00:00
Kai Tietz 277ec793cb * testsuite/26_numerics/complex/requirements/constexpr.cc
* testsuite/26_numerics/complex/requirements/constexpr_functions.cc:
	Use constexpr where needed.

From-SVN: r229883
2015-11-06 14:43:33 -05:00
David Malcolm 9a4bbd5dd2 libstdc++v3: Explicitly disable carets and colorization within testsuite
libstdc++-v3/ChangeLog:
	* testsuite/lib/libstdc++.exp (v3_target_compile): Add
	-fno-diagnostics-show-caret -fdiagnostics-color=never to
	option's additional_flags.

From-SVN: r229876
2015-11-06 18:44:05 +00:00
Jason Merrill 34148d68c7 * libsupc++/new: Declare sized deletes.
From-SVN: r229713
2015-11-03 11:43:54 -05:00
Paolo Carlini 32fec2c8a2 2015-11-03 Paolo Carlini <paolo.carlini@oracle.com>
* Wrap ChangeLog entries to 80 columns.

From-SVN: r229707
2015-11-03 13:41:23 +00:00
Ville Voutilainen f763219373 Make the default constructors of tuple and pair conditionally explicit.
2015-11-03  Ville Voutilainen  <ville.voutilainen@gmail.com>

	Make the default constructors of tuple and pair conditionally explicit.
	* include/std/type_traits (is_unsigned, __is_array_unknown_bounds,
	__is_default_constructible_atom, __is_default_constructible_safe,
	__is_direct_constructible_new_safe, __is_direct_constructible_ref_cast,
	__is_nt_default_constructible_impl, is_nothrow_default_constructible,
	is_nothrow_constructible, is_nothrow_assignable,
	is_trivially_constructible, is_trivially_copy_constructible,
	is_trivially_move_constructible, is_trivially_assignable,
	is_trivially_copy_assignable, is_trivially_move_assignable,
	is_trivially_destructible): Simplify.
	* include/std/type_traits (
	__do_is_implicitly_default_constructible_impl,
	__is_implicitly_default_constructible_impl,
	__is_implicitly_default_constructible_safe,
	__is_implicitly_default_constructible): New.
	* include/bits/stl_pair.h (pair::pair()): Use it.
	* include/std/tuple (tuple<_T1, _T2>::tuple): Use it.
	* include/std/tuple (_ImplicitlyDefaultConstructibleTuple): New.
	* include/std/tuple (tuple<_Types...>::tuple()): Use it.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust.
	* testsuite/20_util/is_implicitly_default_constructible/requirements/explicit_instantiation.cc: New.
	* testsuite/20_util/is_implicitly_default_constructible/requirements/typedefs.cc: Likewise.
	* testsuite/20_util/is_implicitly_default_constructible/value.cc: Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Likewise.
	* testsuite/20_util/pair/cons/explicit_construct.cc: Likewise.
	* testsuite/20_util/tuple/cons/explicit_construct.cc: Likewise.

From-SVN: r229699
2015-11-03 10:41:40 +02:00
Jonathan Wakely 93e954005f Implement C++17 std::invoke and LWG DR 2219
* include/std/functional (__invoke_impl): New overloads.
	(__invoke): Replace with a single function calling __invoke_impl.
	(invoke): Add C++17 std::invoke.
	(reference_wrapper::operator()): Qualify call to __invoke.
	(_Mem_fn_traits_base, _Mem_fn_traits): Remove unused typedefs.
	(_Mem_fn_base): Remove unused typedefs and implement call operator in
	terms of __invoke.
	* include/std/future (__future_base::_Async_state_commonV2): Do not
	pass reference_wrapper as object argument to call_once.
	* include/std/type_traits (result_of): Define nested __invoke_type.
	Handle reference_wrapper as per LWG 2219.
	* testsuite/20_util/bind/ref_neg.cc: Adjust dg-error directives.
	* testsuite/20_util/function_objects/mem_fn/55463.cc: Remove tests
	using member functions of reference_wrapper.

From-SVN: r229290
2015-10-25 01:00:54 +01:00
Jonathan Wakely 6fbd598400 Return deferred future if thread cannot be run
* include/std/future (async): Use deferred function on exception.
	* testsuite/30_threads/async/except.cc: New.

From-SVN: r229289
2015-10-24 22:36:50 +01:00
Jonathan Wakely f9badf7134 * include/std/type_traits (__cpp_lib_bool_constant): Define.
From-SVN: r229152
2015-10-21 22:20:25 +01:00
Jonathan Wakely fe29811c31 Document options for Filesystem TS library
* doc/xml/manual/configure.xml: Document
	--enable-libstdcxx-filesystem-ts option.
	* doc/xml/manual/status_cxx2014.xml: Document libstdc++fs.a.
	* doc/xml/manual/using.xml: Likewise.
	* doc/html/*: Regenerate.

From-SVN: r228914
2015-10-16 14:55:12 +01:00
Aurelio Remonda 6b6254db8a Shrink std::random_shuffle test to pass on simulators
2015-10-16  Aurelio Remonda  <aurelio.remonda@tallertechnologies.com>

	* testsuite/25_algorithms/random_shuffle/moveable.cc: Change variable
	N from const int N = 200000 to const unsigned int N = 10000.
	Delete useless fill_ascending function call.

From-SVN: r228876
2015-10-16 12:12:15 +01:00
Szabolcs Nagy 750002e0ee mark libstdc++ tests unsupported if they fail with "relocation truncated"
* testsuite/lib/libstdc++.exp (libstdc++-dg-test): Check for
	unsupported compiler output.

From-SVN: r228844
2015-10-15 15:15:37 +00:00
Nathan Froyd 141aa58b53 opt_random.h: Include pmmintrin.h instead of x86intrin.h, and only do so when __SSE3__
* config/cpu/i486/opt/bits/opt_random.h: Include pmmintrin.h instead
	of x86intrin.h, and only do so when __SSE3__
	* include/ext/random: Include emmintrin.h instead of x86intrin.h

From-SVN: r228786
2015-10-13 20:55:44 +00:00
Joseph Myers 3c97fe777c Test for __cxa_thread_atexit_impl when cross-compiling libstdc++ for GNU targets.
I noticed that when testing glibc with a cross compiler I got

UNSUPPORTED: nptl/tst-thread_local1

because the libstdc++-v3 configuration for cross compiling defaulted
to __cxa_thread_atexit_impl not being available.  This patch fixes
GLIBCXX_CROSSCONFIG to run the same test (for the case covering
targets with glibc) for __cxa_thread_atexit_impl as for native
compilation, just as it runs most of the other tests done for native
compilation (for these targets, it's not possible to build libstdc++
without already having built libc, so link tests are OK).

Tested with no regressions for cross to arm-none-linux-gnueabi.

	* crossconfig.m4 (GLIBCXX_CROSSCONFIG) <*-linux* | *-uclinux* |
	*-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu | *-cygwin*>: Check for
	__cxa_thread_atexit_impl.
	* configure: Regenerate.

From-SVN: r228695
2015-10-11 23:34:28 +01:00
Jonathan Wakely 7b5fde8304 Missed ChangeLog for previous libstdc++-v3 commit
Add include/experimental/bits dir

	* include/experimental/erase_if.h: Move to ...
	* include/experimental/bits/erase_if.h: New.
	* include/experimental/fs_dir.h: Move to ...
	* include/experimental/bits/fs_dir.h: New.
	* include/experimental/fs_fwd.h: Move to ...
	* include/experimental/bits/fs_fwd.h: New.
	* include/experimental/fs_ops.h: Move to ...
	* include/experimental/bits/fs_ops.h: New.
	* include/experimental/fs_path.h: Move to ...
	* include/experimental/bits/fs_path.h: New.
	* include/experimental/string_view.tcc: Move to ...
	* include/experimental/bits/string_view.tcc: New.
	* include/Makefile.am: Add include/experimental/bits sub-directory.
	* include/Makefile.in: Regenerate.
	* include/experimental/filesystem: Adjust includes.
	* include/experimental/map: Likewise.
	* include/experimental/set: Likewise.
	* include/experimental/string_view: Likewise.
	* include/experimental/unordered_map: Likewise.
	* include/experimental/unordered_set: Likewise.

From-SVN: r228646
2015-10-09 12:19:04 +01:00
Jonathan Wakely ea4554eaea Add include/experimental/bits dir
From-SVN: r228645
2015-10-09 12:11:54 +01:00
Ville Voutilainen 057ce49719 re PR c++/67844 (Cannot make tuple of class with template constructor)
2015-10-05  Ville Voutilainen  <ville.voutilainen@gmail.com>

	PR 67844.
	* include/std/tuple (_TC::_NonNestedTuple): Eagerly reject
	conversions from tuple types same as the target tuple.
	* testsuite/20_util/tuple/67844.cc: New.
	* testsuite/20_util/tuple/cons/nested_tuple_construct.cc: Add
	a missing copyright header.

From-SVN: r228468
2015-10-05 12:57:20 +03:00