Commit Graph

583 Commits

Author SHA1 Message Date
Ulrich Drepper 7341a03ab8 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
From-SVN: r268398
2019-01-30 16:23:44 +00:00
Jonathan Wakely 56a9eaf9ab Fix missing or incorrect feature test macros
* doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
	status.
	* include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
	Define.
	* include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
	changes are supported.
	* include/std/optional (__cpp_lib_optional): Likewise.
	* include/std/variant (__cpp_lib_variant): Likewise.
	* include/std/version [!__STRICT_ANSI__]
	(__cpp_lib_uncaught_exceptions): Define as long integer.
	[__cplusplus >= 201703L] (__cpp_lib_any)
	(__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
	(__cpp_lib_variant): Define for C++17.
	[__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
	as long integer.
	* libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
	integer.

From-SVN: r267936
2019-01-15 12:01:12 +00:00
Jonathan Wakely 04fdd1fdec * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
From-SVN: r267935
2019-01-15 10:34:18 +00:00
Jonathan Wakely 66dc59e24f Document C++20 library status
* doc/xml/manual/intro.xml: Include new section.
	* doc/xml/manual/status_cxx2017.xml: Document more
	implementation-defined properties of the library.
	* doc/xml/manual/status_cxx2020.xml: Document C++2a status.
	* doc/html/*: Regenerate.

From-SVN: r267867
2019-01-11 23:41:15 +00:00
Jonathan Wakely f0f1121b40 Update documentation for C++17 filesystem library
* doc/xml/manual/spine.xml: Update copyright years.
	* doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
	* doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
	for C++17 filesystem library.
	* doc/html/*: Regenerate.

From-SVN: r267648
2019-01-07 12:46:40 +00:00
Jakub Jelinek a554497024 Update copyright years.
From-SVN: r267494
2019-01-01 13:31:55 +01:00
Jonathan Wakely f39365f3ed Fix grammar in libstdc++ ABI history documentation
* doc/xml/manual/abi.xml: Add missing word.

From-SVN: r267285
2018-12-19 20:16:57 +00:00
Gerald Pfeifer 72cfde41e5 documentation_hacking.xml: Update reference to epubcheck.
* doc/xml/manual/documentation_hacking.xml: Update reference
	to epubcheck.

From-SVN: r266970
2018-12-11 04:00:00 +00:00
Jonathan Wakely bd6ccc290a Apply resolution for LWG DR 3096
Add fix for "path::lexically_relative is confused by trailing slashes".

	* doc/xml/manual/intro.xml: Document LWG 3096 change.
	* src/filesystem/std-path.cc (path::lexically_relative(const path&)):
	Treat a final empty element equivalently to a final dot element.
	* testsuite/27_io/filesystem/path/generation/relative.cc: Add checks
	for the examples in the DR.

From-SVN: r266566
2018-11-28 15:36:56 +00:00
Jonathan Wakely 5916922e34 Update C++17 library status docs
* doc/xml/manual/status_cxx2017.xml: Update C++17 status.
	* doc/html/*: Regenerate.

From-SVN: r266559
2018-11-28 13:49:47 +00:00
Jonathan Wakely da29d2a36e PR libstdc++/67843 set shared_ptr lock policy at build-time
This resolves a longstanding issue where the lock policy for shared_ptr
reference counting depends on compilation options when the header is
included, so that different -march options can cause ABI changes. For
example, objects compiled with -march=armv7 will use atomics to
synchronize reference counts, and objects compiled with -march=armv5t
will use a mutex. That means the shared_ptr control block will have a
different layout in different objects, causing ODR violations and
undefined behaviour. This was the root cause of PR libstdc++/42734 as
well as PR libstdc++/67843.

The solution is to decide on the lock policy at build time, when
libstdc++ is configured. The configure script checks for the
availability of the necessary atomic built-ins for the target and fixes
that choice permanently. Different -march flags used to compile user
code will not cause changes to the lock policy. This results in an ABI
change for certain compilations, but only where there was already an ABI
incompatibility between the libstdc++.so library and objects built with
an incompatible -march option. In general, this means a more stable ABI
that isn't silently altered when -march flags make addition atomic ops
available.

To force a target to use "atomic" or "mutex" the new configure option
--with-libstdcxx-lock-policy can be used.

In order to turn ODR violations into linker errors, the uses of
shared_ptr in filesystem directory iterators have been replaced
with __shared_ptr, and explicit instantiations are declared. This
ensures that object files using those types cannot link to libstdc++
libs unless they use the same lock policy.

	PR libstdc++/67843
	* acinclude.m4 (GLIBCXX_ENABLE_LOCK_POLICY): Add new macro
	that defines _GLIBCXX_HAVE_ATOMIC_LOCK_POLICY.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Use GLIBCXX_ENABLE_LOCK_POLICY.
	* doc/xml/manual/configure.xml: Document new configure option.
	* include/bits/fs_dir.h (directory_iterator): Use __shared_ptr
	instead of shared_ptr.
	(recursive_directory_iterator): Likewise.
	(__shared_ptr<_Dir>): Add explicit instantiation declaration.
	(__shared_ptr<recursive_directory_iterator::_Dir_stack>): Likewise.
	* include/bits/shared_ptr_base.h (__allocate_shared, __make_shared):
	Add default template argument for _Lock_policy template parameter.
	* include/ext/concurrence.h (__default_lock_policy): Check macro
	_GLIBCXX_HAVE_ATOMIC_LOCK_POLICY instead of checking if the current
	target supports the builtins for compare-and-swap.
	* src/filesystem/std-dir.cc (__shared_ptr<_Dir>): Add explicit
	instantiation definition.
	(__shared_ptr<recursive_directory_iterator::_Dir_stack>): Likewise.
	(directory_iterator, recursive_directory_iterator): Use __make_shared
	instead of make_shared.

From-SVN: r266533
2018-11-27 23:25:56 +00:00
Joseph Myers 22e0527251 Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856).
This patch updates GCC to use autoconf 2.69 and automake 1.15.1.
(That's not the latest automake version, but it's the one used by
binutils-gdb, with which consistency is desirable, and in any case
seems a useful incremental update that should make a future update to
1.16.1 easier.)

The changes are generally similar to the binutils-gdb ones, and are
copied from there where shared files and directories are involved
(there are some further changes to such shared directories, however,
which I'd expect to apply to binutils-gdb once this patch is in GCC).
Largely, obsolete AC_PREREQ calls are removed, while many
AC_LANG_SOURCE calls are added to avoid warnings from aclocal and
autoconf.  Multilib support is no longer included in core automake,
meaning that multilib.am needs copying from automake's contrib
directory into the GCC source tree.  Autoconf 2.69 has Go support, so
local copies of that support are removed.  I hope the D support will
soon be submitted to upstream autoconf so the local copy of that can
be removed in a future update.  Changes to how automake generates
runtest calls mean quotes are removed from RUNTEST definitions in five
lib*/testsuite/Makefile.am files (libatomic, libgomp, libitm,
libphobos, libvtv; some others have RUNTEST definitions without
quotes, which are still OK); libgo and libphobos also get
-Wno-override added to AM_INIT_AUTOMAKE so those overrides of RUNTEST
do not generate automake warnings.

Note that the regeneration did not include regeneration of
fixincludes/config.h.in (attempting such regeneration resulted in all
the USED_FOR_TARGET conditionals disappearing; and I don't see
anything in the fixincludes/ directory that would result in such
conditionals being generated, unlike in the gcc/ directory).  Also
note that libvtv/testsuite/other-tests/Makefile.in was not
regenerated; that directory is not listed as a subdirectory for which
Makefile.in gets regenerated by calling "automake" in libvtv/, so I'm
not sure how it's meant to be regenerated.

While I mostly fixed warnings should running aclocal / automake /
autoconf, there were various such warnings from automake in the
libgfortran, libgo, libgomp, liboffloadmic, libsanitizer, libphobos
directories that I did not fix, preferring to leave those to the
relevant subsystem maintainers.  Specifically, most of those warnings
were of the following form (example from libgfortran):

Makefile.am:48: warning: source file 'caf/single.c' is in a subdirectory,
Makefile.am:48: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled.  For now, the corresponding output
automake: object file(s) will be placed in the top-level directory.  However,
automake: this behaviour will change in future Automake versions: they
will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.

I think it's best for the relevant maintainers to add subdir-objects
and do any other associated Makefile.am changes needed.  In some cases
the paths in the warnings involved ../; I don't know if that adds any
extra complications to the use of subdir-objects.

I've tested this with native, cross and Canadian cross builds.  The
risk of any OS-specific issues should I hope be rather lower than if a
libtool upgrade were included (we *should* do such an upgrade at some
point, but it's more complicated - it involves identifying all our
local libtool changes to see if any aren't included in the upstream
version we update to, and reverting an upstream libtool patch that's
inappropriate for use in GCC); I think it would be better to get this
update into GCC so that people can test in different configurations
and we can fix any issues found, rather than to try to get more and
more testing done before it goes in.

top level:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* multilib.am: New file.  From automake.

	Merge from binutils-gdb:
	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

	* libtool.m4: Use AC_LANG_SOURCE.
	* configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE.
	* ar-lib: New file.
	* test-driver: New file.
	* configure: Re-generate.

config:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* math.m4, tls.m4: Use AC_LANG_SOURCE.

	Merge from binutils-gdb:
	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

	* override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69.

fixincludes:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.
	* aclocal.m4, configure: Regenerate.

gcc:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
	line for second argument of AC_DEFINE_UNQUOTED.
	* doc/install.texi (Tools/packages necessary for modifying GCC):
	Update to autoconf 2.69 and automake 1.15.1.
	* aclocal.m4, config.in, configure: Regenerate.

gnattools:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.
	* configure: Regenerate.

gotools:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* config/go.m4: Remove file.
	* Makefile.am (ACLOCAL_AMFLAGS): Do not use -I ./config.
	* configure.ac:  Remove AC_PREREQ.  Do not include config/go.m4.
	* Makefile.in, aclocal.m4, configure: Regenerate.

intl:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	Merge from binutils-gdb:
	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

	* configure.ac: Add AC_USE_SYSTEM_EXTENSIONS, remove AC_PREREQ.
	* configure: Re-generate.
	* config.h.in: Re-generate.
	* aclocal.m4: Re-generate.

libada:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.
	* configure: Regenerate.

libatomic:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* acinclude.m4: Use AC_LANG_SOURCE.
	* configure.ac: Remove AC_PREREQ.
	* testsuite/Makefile.am (RUNTEST): Remove quotes.
	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
	Regenerate.

libbacktrace:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
	* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.

libcc1:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.
	* Makefile.in, aclocal.m4, configure: Regenerate.

libcpp:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
	* aclocal.m4, config.in, configure: Regenerate.

libdecnumber:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	Merge from binutils-gdb:
	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

	* configure.ac: Remove AC_PREREQ.
	* configure: Re-generate.
	* aclocal.m4.

libffi:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	(AUTOMAKE_OPTIONS): Add info-in-builddir.
	(CLEANFILES): Remove doc/libffi.info.
	* configure.ac: Remove AC_PREREQ.
	* Makefile.in, aclocal.m4, configure, fficonfig.h.in,
	include/Makefile.in, man/Makefile.in, testsuite/Makefile.in:
	Regenerate.

libgcc:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
	* configure: Regenerate.

libgfortran:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* configure.ac: Remove AC_PREREQ.
	* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.

libgo [logically part of this change but omitted from the commit]:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* config/go.m4: Remove file.
	* config/libtool.m4: Use AC_LANG_SOURCE.
	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use
	-Wno-override in AM_INIT_AUTOMAKE call.
	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
	Regenerate.

libgomp:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am
	(AUTOMAKE_OPTIONS): Add info-in-builddir.
	(CLEANFILES): Remove libgomp.info.
	* configure.ac: Remove AC_PREREQ.
	* testsuite/Makefile.am (RUNTEST): Remove quotes.
	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
	Regenerate.

libhsail-rt:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.
	* Makefile.in, aclocal.m4, configure: Regenerate.

libiberty:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	Merge from binutils-gdb:
	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

	* configure.ac: Remove AC_PREREQ.
	* configure: Re-generate.
	* config.in: Re-generate.

libitm:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	(AUTOMAKE_OPTIONS): Add info-in-builddir.
	(CLEANFILES): Remove libitm.info.
	* configure.ac: Remove AC_PREREQ.
	* testsuite/Makefile.am (RUNTEST): Remove quotes.
	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
	Regenerate.

libobjc:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.
	* aclocal.m4, config.h.in, configure: Regenerate.

liboffloadmic:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* configure.ac: Remove AC_PREREQ.
	* plugin/Makefile.am: Include multilib.am.
	* plugin/configure.ac: Remove AC_PREREQ.
	* Makefile.in, aclocal.m4, configure, plugin/Makefile.in,
	plugin/aclocal.m4, plugin/configure: Regenerate.

libphobos:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* configure.ac: Remove AC_PREREQ.  Use -Wno-override in
	AM_INIT_AUTOMAKE call.
	* m4/autoconf.m4: Add extra argument to AC_LANG_DEFINE call.
	* m4/druntime/os.m4: Use AC_LANG_SOURCE.
	* testsuite/Makefile.am (RUNTEST): Remove quotes.
	* Makefile.in, aclocal.m4, configure, libdruntime/Makefile.in,
	src/Makefile.in, testsuite/Makefile.in: Regenerate.

libquadmath:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	(AUTOMAKE_OPTIONS): Remove 1.8.  Add info-in-builddir.
	(all-local): Define outside conditional code.
	(CLEANFILES): Remove libquadmath.info.
	* configure.ac: Remove AC_PREREQ.
	* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.

libsanitizer:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
	* Makefile.in, aclocal.m4, asan/Makefile.in, configure,
	interception/Makefile.in, libbacktrace/Makefile.in,
	lsan/Makefile.in, sanitizer_common/Makefile.in, tsan/Makefile.in,
	ubsan/Makefile.in: Regenerate.

libssp:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	(AUTOMAKE_OPTIONS): Remove 1.9.5.
	* configure.ac: Remove AC_PREREQ.  Quote argument to
	AC_RUN_IFELSE.
	* Makefile.in, aclocal.m4, configure: Regenerate.

libstdc++-v3:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* configure.ac: Remove AC_PREREQ.
	* Makefile.in, aclocal.m4, configure, doc/Makefile.in,
	include/Makefile.in, libsupc++/Makefile.in, po/Makefile.in,
	python/Makefile.in, src/Makefile.in, src/c++11/Makefile.in,
	src/c++17/Makefile.in, src/c++98/Makefile.in,
	src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate.

libvtv:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* configure.ac: Remove AC_PREREQ.
	* testsuite/Makefile.am (RUNTEST): Remove quotes.
	* Makefile.in, aclocal.m4, configure, testsuite/Makefile.in:
	Regenerate.

lto-plugin:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
	* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.

zlib:
2018-10-31  Joseph Myers  <joseph@codesourcery.com>

	PR bootstrap/82856
	* Makefile.am: Include multilib.am.

	Merge from binutils-gdb:
	2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>

	* configure.ac: Modernize AC_INIT call, remove AC_PREREQ.
	* Makefile.am (AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add foreign.
	* Makefile.in: Re-generate.
	* aclocal.m4: Re-generate.
	* configure: Re-generate.

From-SVN: r265695
2018-10-31 17:03:16 +00:00
Gerald Pfeifer 3553df866a allocator.xml: Adjust link to "Reconsidering Custom Memory Allocation".
* doc/xml/manual/allocator.xml: Adjust link to "Reconsidering
	Custom Memory Allocation".

From-SVN: r264761
2018-10-01 15:17:15 +00:00
Jonathan Wakely 8e4d333b0e Regenerate libstdc++ HTML pages
* doc/html/*: Regenerate.

From-SVN: r264760
2018-10-01 15:28:36 +01:00
Gerald Pfeifer f1525dd4b4 messages.xml: Switch link to www.oracle.com to https.
* doc/xml/manual/messages.xml: Switch link to www.oracle.com
	to https.

From-SVN: r264723
2018-09-30 11:41:31 +00:00
Gerald Pfeifer 8b3f158946 policy_data_structures_biblio.xml: Update link to Microsoft Component Model Object Technologies.
* doc/xml/manual/policy_data_structures_biblio.xml: Update
	link to Microsoft Component Model Object Technologies.

From-SVN: r264722
2018-09-30 10:53:14 +00:00
Gerald Pfeifer 15f8a37755 fdl-1.3.xml: The Free Software Foundation web site now uses https.
* doc/xml/gnu/fdl-1.3.xml: The Free Software Foundation web
	site now uses https. Also omit the unnecessary trailing slash.
	* doc/xml/gnu/gpl-3.0.xml: Ditto.

From-SVN: r264710
2018-09-29 11:25:57 +00:00
Gerald Pfeifer 44eb8fa73b codecvt.xml: Move link to "UTF-8 and Unicode FAQ" to https.
* doc/xml/manual/codecvt.xml: Move link to "UTF-8 and Unicode FAQ"
	to https.

From-SVN: r264547
2018-09-24 22:01:49 +00:00
Gerald Pfeifer 54b7d98ec4 policy_data_structures_biblio.xml: Update link to "Priority Queues and the STL".
* doc/xml/manual/policy_data_structures_biblio.xml: Update link
	to "Priority Queues and the STL".

From-SVN: r264527
2018-09-24 11:14:36 +00:00
Gerald Pfeifer 839837b036 using_exceptions.xml: Move boost.orgs link to https.
* doc/xml/manual/using_exceptions.xml: Move boost.orgs link to
	https.

From-SVN: r264515
2018-09-23 14:57:25 +00:00
Gerald Pfeifer d1f43ba348 profile_mode.xml: Update three ieeexplore.ieee.org references.
* doc/xml/manual/profile_mode.xml: Update three ieeexplore.ieee.org
	references.

From-SVN: r264031
2018-09-01 21:27:14 +00:00
Jonathan Wakely 7c1dcf5012 PR libstdc++/77854 document size_type for containers
PR libstdc++/77854
	* doc/xml/manual/status_cxx1998.xml: Document size_type and
	difference_type for containers.
	* doc/html/*: Regenerate.

From-SVN: r263767
2018-08-22 13:11:17 +01:00
Jonathan Wakely 484e936e88 PR libstdc++/85343 overload __throw_ios_failure to take errno
[ios::failure] p2: "When throwing ios_base::failure exceptions,
implementations should provide values of ec that identify the specific
reason for the failure."

This adds a new overload of __throw_ios_failure that can be passed
errno, to store error_code(errno, system_category()) in the exception
object.

	PR libstdc++/85343
	* acinclude.m4 (libtool_VERSION): Bump version.
	* config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add new symbol version.
	Export new symbol.
	* configure: Regenerate.
	* doc/xml/manual/abi.xml: Document new versions.
	* include/bits/fstream.tcc (basic_filebuf<C, T>::underflow)
	(basic_filebuf<C, T>::xsgetn): Pass errno to __throw_ios_failure.
	* include/bits/functexcept.h (__throw_ios_failure(const char*, int)):
	Declare new overload.
	* src/c++11/cxx11-ios_failure.cc (__ios_failure): Add new constructor
	and static member function.
	(__throw_ios_failure(const char*, int)): Define.
	* src/c++98/ios_failure.cc [!_GLIBCXX_USE_DUAL_ABI]
	(__throw_ios_failure(const char*, int)): Define.
	* testsuite/util/testsuite_abi.cc: Update known and latest versions.

From-SVN: r263535
2018-08-14 13:09:57 +01:00
Jonathan Wakely b66e5a95c0 PR libstdc++/68210 adjust operator new and delete for LWG 206
Ensure that nothrow versions of new and delete call the ordinary
versions of new or delete, instead of calling malloc or free directly.

These files are all compiled with -std=gnu++14 so can use noexcept and
nullptr to make the code more readable.

	PR libstdc++/68210
	* doc/xml/manual/intro.xml: Document LWG 206 change.
	* libsupc++/del_op.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
	* libsupc++/del_opa.cc: Likewise.
	* libsupc++/del_opant.cc: Likewise.
	* libsupc++/del_opnt.cc: Likewise. Call operator delete(ptr) instead
	of free(ptr).
	* libsupc++/del_ops.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
	* libsupc++/del_opsa.cc: Likewise.
	* libsupc++/del_opva.cc: Likewise.
	* libsupc++/del_opvant.cc: Likewise.
	* libsupc++/del_opvnt.cc: Likewise. Call operator delete[](ptr)
	instead of operator delete(ptr).
	* libsupc++/del_opvs.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
	* libsupc++/del_opvsa.cc: Likewise.
	* libsupc++/new_op.cc: Use __builtin_expect in check for zero size.
	* libsupc++/new_opa.cc: Use nullptr instead of literal 0.
	* libsupc++/new_opant.cc: Likewise. Replace _GLIBCXX_USE_NOEXCEPT
	with noexcept.
	* libsupc++/new_opnt.cc: Likewise. Call operator new(sz) instead of
	malloc(sz).
	* libsupc++/new_opvant.cc: Use nullptr and noexcept.
	* libsupc++/new_opvnt.cc: Likewise. Call operator new[](sz) instead of
	operator new(sz, nothrow).
	* testsuite/18_support/new_nothrow.cc: New test.

From-SVN: r263478
2018-08-10 21:20:27 +01:00
Jonathan Wakely 2e9dae0456 Fix Docbook markup for table entry
* doc/xml/manual/using.xml: Fix markup for empty table entry.
	* doc/html/*: Regenerate.

From-SVN: r263401
2018-08-08 14:37:24 +01:00
Jonathan Wakely c0d57e63bb Add missing <experimental/numeric> header to docs
* doc/xml/manual/using.xml: Add missing header to table and fix typo.
	* doc/html/*: Regenerate.

From-SVN: r263398
2018-08-08 14:29:25 +01:00
Jonathan Wakely 3e64a626d7 Improve libstdc++ docs w.r.t newer C++ standards
Instead of repeating all the old headers for every new standard I've
changed the docs to only list the new headers for each standard.

	* doc/xml/manual/test.xml: Improve documentation on writing tests for
	newer standards.
	* doc/xml/manual/using.xml: Document all headers for C++11 and later.
	* doc/html/*: Regenerate.

From-SVN: r263163
2018-07-31 16:02:32 +01:00
Jonathan Wakely c3be340eb6 PR libstdc++/86450 use -Wabi=2 and simplify -Werror use
Use -Wabi=2 to fix warnings about -Wabi having no effect on its own.
This requires suppressing two warnings in src/c++11/debug.cc which do
not affect the library ABI.

Previously libstdc++ defaulted to --enable-werror but the -Werror flag
was not actually added unless --enable-maintainer-mode was used. This is
not documented and not the expected behaviour. This removes any special
treatment for maintainer-mode, makes -Werror depend directly on
--enable-werror, and changes the default to --enable-werror=no.

	PR libstdc++/86450
	* acinclude.m4 (GLIBCXX_CHECK_COMPILER_FEATURES): Don't define WERROR.
	(GLIBCXX_EXPORT_FLAGS): Use -Wabi=2 instead of -Wabi.
	* configure: Regenerate.
	* configure.ac: Change GLIBCXX_ENABLE_WERROR default to "no".
	* doc/Makefile.in: Regenerate.
	* fragment.am: Set WERROR_FLAG to -Werror instead of $(WERROR).
	* 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++11/debug.cc: Use diagnostic pragmas to suppress warnings
	from -Wabi=2 that don't affect exported symbols.
	* src/c++98/Makefile.in: Regenerate.
	* src/filesystem/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

From-SVN: r262824
2018-07-17 14:18:47 +01:00
Jonathan Wakely b03f3a94e6 * doc/xml/manual/status_cxx2017.xml: Document N4531 status.
From-SVN: r262025
2018-06-25 17:42:28 +01:00
Jonathan Wakely 5d84e6c53e LWG 3076 basic_string CTAD ambiguity
When deduction guides are supported by the compiler (i.e. for C++17 and
later) replace two basic_string constructors by constrained function
templates as required by LWG 3075. In order to ensure that the pre-C++17
non-template constructors are still exported from the shared library
define a macro in src/c++11/string-inst.cc to force the non-template
declarations (this isn't strictly needed yet, because the string
instantiations are compiled with -std=gnu++11, but that is likely to
change).

	LWG 3076 basic_string CTAD ambiguity
	* doc/xml/manual/intro.xml: Document LWG 3076 change.
	* include/bits/basic_string.h
	[__cpp_deduction_guides && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
	(basic_string(const _CharT*, const _Alloc&)): Turn into a function
	template constrained by _RequireAllocator.
	(basic_string(size_type, _CharT, const _Alloc&)): Likewise.
	* src/c++11/string-inst.cc (_GLIBCXX_DEFINING_STRING_INSTANTIATIONS):
	Define.
	* testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
	deduction
	* testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
	Likewise.

From-SVN: r261670
2018-06-16 00:47:33 +01:00
Jonathan Wakely 7f93abd805 LWG 2993 reference_wrapper<T> conversion from T&&
* doc/xml/manual/intro.xml: Document LWG 2993 change.
	* include/bits/refwrap.h (reference_wrapper(_Tp&)): Remove.
	(reference_wrapper(_Tp&&)): Remove.
	(reference_wrapper<_Up>(_Up&&)): Define new constructor as constrained
	template.
	(reference_wrapper): Add deduction guide.
	* testsuite/20_util/reference_wrapper/deduction.cc: New.
	* testsuite/20_util/reference_wrapper/lwg2993.cc: New.

From-SVN: r261632
2018-06-15 15:19:47 +01:00
Jonathan Wakely db5ab3aa92 LWG 3074 make scalar types non-deduced in valarray non-member functions
* include/bits/valarray_after.h (_DEFINE_EXPR_BINARY_FUNCTION): Change
	scalar parameters to be a non-deduced context.
	* include/std/valarray (_DEFINE_BINARY_OPERATOR): Likewise. Adjust
	whitespace.
	* testsuite/26_numerics/valarray/operators.cc: Test scalar operands.
	* testsuite/26_numerics/valarray/transcend.cc: New.

From-SVN: r261610
2018-06-14 20:36:54 +01:00
Jonathan Wakely 0f8a1c150e Document Dual ABI for std::ios_base::failure
* doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
	* doc/xml/manual/debug_mode.xml: Add array and forward_list to list
	of C++11 containers with Debug Mode support.
	* doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
	* doc/html/*: Regenerate.

From-SVN: r260129
2018-05-10 20:13:42 +01:00
Jonathan Wakely b83f5981c1 Document -lstdc++fs requirement for std::filesystem
* doc/xml/manual/using.xml (table.cmd_options): Document that the
	C++17 Filesystem implementation also needs -lstdc++fs.

From-SVN: r260011
2018-05-07 20:17:16 +01:00
Jonathan Wakely 52556a878d Update libstdc++ manual in preparation for GCC 8 release
* doc/xml/manual/abi.xml: Document header locations in recent
	releases.
	* doc/xml/manual/evolution.xml: Add API changes since GCC 5.
	* doc/xml/manual/spine.xml: Update copyright years.
	* doc/xml/manual/strings.xml: Adjust tolower example to avoid
	undefined behaviour.
	* doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests.
	* doc/html/*: Regenerate.

From-SVN: r259308
2018-04-11 01:21:35 +01:00
Jonathan Wakely 25949ee332 Update links to archived copy of SGI STL docs
* doc/xml/faq.xml: Update links to archived copy of SGI STL docs.
	* doc/xml/manual/backwards_compatibility.xml: Likewise.
	* doc/xml/manual/containers.xml: Likewise.
	* doc/xml/manual/debug_mode.xml: Likewise.
	* doc/xml/manual/extensions.xml: Likewise.
	* doc/xml/manual/policy_data_structures_biblio.xml: Likewise.
	* doc/xml/manual/using.xml: Likewise.
	* doc/xml/manual/utilities.xml: Likewise.

From-SVN: r259286
2018-04-10 16:49:26 +01:00
Gerald Pfeifer 8c00b6a4e8 api.xml: www.fsf.org has moved to https.
* doc/xml/api.xml: www.fsf.org has moved to https. Also omit
	trailing slash for domain level link.
	* doc/xml/faq.xml: Ditto.
	* doc/xml/manual/appendix_free.xml (software): Ditto.
	* doc/xml/manual/intro.xml: Ditto.
	* doc/xml/manual/spine.xml: Ditto.
	* doc/xml/spine.xml: Ditto.

From-SVN: r258637
2018-03-18 23:52:00 +00:00
Gerald Pfeifer 1de51fbc6f documentation_hacking.xml: Adjust link to docbook.org.
* doc/xml/manual/documentation_hacking.xml: Adjust link to
	docbook.org.

From-SVN: r258636
2018-03-18 23:38:23 +00:00
Jonathan Wakely b53e4e1c51 Regenerate libstdc++ documentation
* doc/xml/faq.xml: Update copyright years.
	* doc/html/*: Regenerate.

From-SVN: r257142
2018-01-29 12:37:17 +00:00
Jakub Jelinek 85ec4feb11 Update copyright years.
From-SVN: r256169
2018-01-03 11:03:58 +01:00
Jonathan Wakely c41743d0c0 PR libstdc++/83538 fix std::match_results<T>::reference (LWG 2306)
PR libstdc++/83538
	* doc/xml/manual/intro.xml: Document LWG 2306 change.
	* include/bits/regex.h (match_results::reference): Change to
	non-const reference.
	* testsuite/28_regex/match_results/typedefs.cc: Check types are
	correct.

From-SVN: r256012
2017-12-27 19:43:33 +00:00
Przemyslaw Wirkus b99415b760 Fix invalid XML in libstdc++ manual
2017-11-21  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* doc/xml/manual/using.xml (manual.intro.using.macros): Move
	variablelist element at the end of its list.

From-SVN: r255023
2017-11-21 18:45:04 +00:00
Igor Tsimbalist 36101de964 Enable building libstdc++-v3 with Intel CET
libstdc++-v3/
	* acinclude.m4: Add cet.m4.
	* configure.ac: Set CET_FLAGS. Update EXTRA_CFLAGS,
	EXTRA_CXX_FLAGS.
	* libsupc++/Makefile.am: Use Add EXTRA_CFLAGS.
	* Makefile.in: Regenerate.
	* 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: r254895
2017-11-17 22:28:10 +01:00
Gerald Pfeifer ba89e5d5a7 * doc/xml/manual/abi.xml: Move docs.oracle.com references to https.
From-SVN: r254426
2017-11-05 11:14:38 +00:00
Jonathan Wakely 932bfa9bc7 Minor tweak to libstdc++ FAQ
* doc/xml/faq.xml: Adjust "What is libstdc++?" answer slightly.

From-SVN: r254224
2017-10-30 14:56:23 +00:00
Jonathan Wakely 5fdbeb16d7 Update C++17 library status documentation
* doc/xml/manual/status_cxx2017.xml: Update C++17 status, and
	information on feature-test macros.
	* doc/html/*: Regenerate.

From-SVN: r254078
2017-10-25 15:06:12 +01:00
Jonathan Wakely 908d1d3aea PR libstdc++/82644 document IS 29124 support
Also fix declarations of special functions in C++17, to import them into
the global namespace in <math.h>, and to prevent defining the
non-standard hypergeometric functions in strict mode.

	PR libstdc++/82644
	* doc/xml/manual/intro.xml: Include new section.
	* doc/xml/manual/status_cxxis29124.xml: New section on IS 29124
	status.
	* include/bits/specfun.h [__STRICT_ANSI__] (hyperg, hypergf, hypergl)
	(conf_hyperg, conf_hypergf, conf_hypergl): Don't declare.
	* include/c_compatibility/math.h: Import special functions into
	global namespace for C++17.
	* testsuite/26_numerics/headers/cmath/82644.cc: New test.
	* testsuite/26_numerics/headers/cmath/functions_global_c++17.cc: New
	test.

From-SVN: r254004
2017-10-23 12:10:28 +01:00
Jonathan Wakely 89b1e16136 Update references to C++17 in libstdc++ manual
* doc/xml/manual/status_cxx2017.xml: Update references to C++17
	section numbers.

From-SVN: r253895
2017-10-19 14:57:02 +01:00
Jonathan Wakely 3b0dd4fea2 PR libstdc++/82522 overload map insert functions for rvalues (LWG 2354)
PR libstdc++/82522
	* doc/xml/manual/intro.xml: Document LWG 2354 changes.
	* include/bits/stl_map.h (map::insert(value_type&&))
	(map::insert(const_iterator, value_type&&)): Add overload for rvalues.
	* include/bits/stl_multimap.h (multimap::insert(value_type&&))
	(multimap::insert(const_iterator, value_type&&)): Likewise.
	* include/bits/unordered_map.h (unordered_map::insert(value_type&&))
	(unordered_map::insert(const_iterator, value_type&&))
	(unordered_multimap::insert(value_type&&))
	(unordered_multimap::insert(const_iterator, value_type&&)): Likewise.
	* testsuite/23_containers/map/modifiers/insert/dr2354.cc: New test.
	* testsuite/23_containers/multimap/modifiers/insert/dr2354.cc: New
	test.
	* testsuite/23_containers/unordered_map/insert/dr2354.cc: New test.
	* testsuite/23_containers/unordered_multimap/insert/dr2354.cc: New
	test.

From-SVN: r253725
2017-10-13 13:39:32 +01:00
Jonathan Wakely c29730ec17 Fix broken URLs in libstdc++ API docs
* doc/doxygen/mainpage.html: Fix broken URLs.

From-SVN: r252070
2017-09-13 11:17:44 +01:00