Commit Graph

423 Commits

Author SHA1 Message Date
Tomasz Kamiński
6a8b3a6308 libstdc++/doc: Document generate_canonical and variant compat macros.
The _GLIBCXX_USE_OLD_GENERATE_CANONICAL was introduced by
r16-6177-g866bc8a9214b1d that implemented P0952R2 [1] resolution
for LWG2524 as DR against C++20.

The _GLIBCXX_USE_VARIANT_CXX17_OLD_ABI was introduced by
r16-6301-gb3c167b61fd75f that resovled PR112591.

[1] https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p0952r2.html

libstdc++-v3/ChangeLog:

	* doc/html/manual/using_macros.html: Regenerate.
	* doc/xml/manual/using.xml: Add entries for
	_GLIBCXX_USE_OLD_GENERATE_CANONICAL and
	_GLIBCXX_USE_VARIANT_CXX17_OLD_ABI.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
2025-12-22 19:34:25 +01:00
Yuao Ma
fe3c8455d0 libstdc++: fix dead links in doc
libstdc++-v3/ChangeLog:

	* doc/html/manual/using_exceptions.html: Replace dead link.
	* doc/xml/manual/using_exceptions.xml: Likewise.
2025-11-21 23:37:25 +08:00
Jonathan Wakely
01b8c6ffbd libstdc++: Update some old docs about predefined feature macros
libstdc++-v3/ChangeLog:

	* doc/xml/faq.xml: Refresh information on _GNU_SOURCE and
	_XOPEN_SOURCE being predefined.
	* doc/xml/manual/internals.xml: Remove outdated paragraph about
	_POSIX_SOURCE in libstdc++ source files.
	* doc/html/*: Regenerate.
2025-11-21 15:30:49 +00:00
Jonathan Wakely
44f3027e3b libstdc++: Update GCC 16.1 library versions in docs
libstdc++-v3/ChangeLog:

	* doc/xml/manual/abi.xml: Add versions for GCC 16.
	* doc/html/manual/abi.html: Regenerate.
2025-11-19 21:55:06 +00:00
Jonathan Wakely
cd54244e09 libstdc++: Update GCC 15.1 library versions in docs [PR122743]
libstdc++-v3/ChangeLog:

	PR libstdc++/122743
	* doc/xml/manual/abi.xml: Add versions for GCC 15.
	* doc/html/manual/abi.html: Regenerate.
2025-11-19 21:55:06 +00:00
Jonathan Wakely
d0e0f6beb1 libstdc++: Remove vertical whitespace from code listings in manual
This removes unnecessary whitespace following <pre> blocks in the HTML
output.

libstdc++-v3/ChangeLog:

	* doc/xml/faq.xml: Remove unwanted whitespace inside
	programlisting elements.
	* doc/xml/manual/allocator.xml: Likewise.
	* doc/xml/manual/auto_ptr.xml: Likewise.
	* doc/xml/manual/backwards_compatibility.xml: Likewise.
	* doc/xml/manual/build_hacking.xml: Likewise.
	* doc/xml/manual/containers.xml: Likewise.
	* doc/xml/manual/diagnostics.xml: Likewise.
	* doc/xml/manual/extensions.xml: Likewise.
	* doc/xml/manual/intro.xml: Likewise.
	* doc/xml/manual/io.xml: Likewise.
	* doc/xml/manual/iterators.xml: Likewise.
	* doc/xml/manual/numerics.xml: Likewise.
	* doc/xml/manual/policy_data_structures.xml: Likewise.
	* doc/xml/manual/strings.xml: Likewise.
	* doc/xml/manual/support.xml: Likewise.
	* doc/xml/manual/test.xml: Likewise.
	* doc/xml/manual/using.xml: Likewise.
	* doc/xml/manual/utilities.xml: Likewise.
	* doc/html/*: Regenerate.
2025-11-19 21:54:12 +00:00
Gerald Pfeifer
c1a8b4fa50 libstdc++: Update Autoconf manual link
libstdc++-v3:
	* doc/xml/manual/build_hacking.xml: Update Autoconf manual link.
	* doc/html/manual/appendix_porting.html: Regenerate.
2025-10-11 12:18:56 +02:00
Jonathan Wakely
3f70e62553 libstdc++: Update dead links to PSTL upstream in docs
The pstl code has been removed from the llvm repo so point to the Intel
upstream project where it really originates from.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2017.xml: Replace broken link to PSTL
	upstream.
	* doc/xml/manual/status_cxx2020.xml: Likewise.
	* doc/html/manual/status.html: Regenerate.

Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
2025-10-08 17:33:21 +01:00
Tomasz Kamiński
deb7e9312a libstdc++: Add C++2020 Implementation status table.
This is derived from Table of Content of the ISO/IEC 14882:2020.
Section are included up to depth limit of 3 in majority of the cases.

libstdc++-v3/ChangeLog:

	* doc/html/manual/index.html: Regenerated.
	* doc/html/manual/status.html: Regenerated.
	* doc/xml/manual/status_cxx2020.xml: Added status table.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
2025-10-03 11:59:04 +02:00
Tomasz Kamiński
2ec29759ba libstdc++: Document remaining C++20 implementation-defined behavior.
I have double checked that implementation-defined behavior in the [compliance]
(whether the implementation is freestanding) and [stringbuf.const] (initialization
of sequence pointers) are indeed null, and there are no corresponding entires in
earlier standards.

libstdc++-v3/ChangeLog:

	* doc/html/manual/status.html: Regenerate.
	* doc/xml/manual/status_cxx2020.xml: Add more entires.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
2025-09-10 09:43:43 +02:00
Tomasz Kamiński
88d4738ddc libstdc++: Document C++20 atomic_ref implementation-defined behavior.
Also introduce Implementation Specific Behavior section for C++20.

libstdc++-v3/ChangeLog:

	* doc/html/index.html: Regenerated.
	* doc/html/manual/index.html: Regenerated.
	* doc/html/manual/intro.html: Regenerated.
	* doc/html/manual/status.html: Regenatered.
	* doc/xml/manual/status_cxx2020.xml: Add iso.2020.specific
	section with atomic_ref documentation.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
2025-09-10 09:15:16 +02:00
Arsen Arsenović
c7e9d256fb libstdc++: Replace "Tunables" link with one that does not have an anchor
This works around a dblatex bug, where dblatex emits invalid TeX, by
placing a raw "#" in a \href.

Fixes: f6ff531d90 ("libstdc++: Update link to "Tunables" in Glibc manual")

libstdc++-v3/ChangeLog:

	* doc/xml/manual/using_exceptions.xml: Replace "Tunables" link
	with one that does not have an anchor.
	* doc/html/manual/using_exceptions.html: Regenerate.
2025-09-09 13:04:57 +02:00
Jonathan Wakely
d199a9c7c5 libstdc++: Fix docs for --enable-vtable-verify [PR120698]
libstdc++-v3/ChangeLog:

	PR libstdc++/120698
	* doc/xml/manual/configure.xml: Do not claim that vtv is enabled
	by default.
	* doc/html/manual/configure.html: Regenerate.
2025-09-08 21:54:32 +01:00
Gerald Pfeifer
f6ff531d90 libstdc++: Update link to "Tunables" in Glibc manual
libstdc++-v3:
	* doc/xml/manual/using_exceptions.xml: Update link to "Tunables"
	section in the Glibc manual.
	* doc/html/manual/using_exceptions.html: Regenerate.
2025-09-08 11:07:25 +02:00
Tomasz Kamiński
39d7c4d42a libstdc++: Document remaining C++17 implementation-defined behavior.
This also covers bad_function_call::what from C++11.

libstdc++-v3/ChangeLog:

	* doc/html/manual/status.html: Regenerate.
	* doc/xml/manual/status_cxx2011.xml: Add entry for bad_function_call.
	* doc/xml/manual/status_cxx2017.xml: Add entries for bad_any_cast
	and nullptr_t output. Update entry for sf.cmath. Fix stable name for
	mem.res.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
2025-09-05 16:54:10 +02:00
Tomasz Kamiński
d6c370b8e9 libstdc++: Document missing implementation defined behavior for std::filesystem.
libstdc++-v3/ChangeLog:

	* doc/html/manual/status.html: Regenerate the file.
	* doc/xml/manual/status_cxx2017.xml: Addd more entires.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
2025-09-05 14:50:42 +02:00
Tomasz Kamiński
b26033d579 libstdc++: Add stable names to C++98 implementation-defined docs.
Stable names are based on C++03 standard document, and some of then were
changed since then.

libstdc++-v3/ChangeLog:

	* doc/html/manual/status.html: Regenerated the file.
	* doc/xml/manual/status_cxx1998.xml: Add stable name to
	each entry.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
2025-09-04 09:57:05 +02:00
Gerald Pfeifer
6094b4de7b libstdc++: Update link to Boost "Exception-Safety"
libstdc++-v3:
	* doc/xml/manual/using_exceptions.xml: Update link to
	Boost's "Exception-Safety"
	* doc/html/manual/using_exceptions.html: Rebuild.
2025-08-31 12:13:45 +02:00
Gerald Pfeifer
b163ea73dc libstdc++: Switch gcc.gnu.org installation docs to https
libstdc++-v3:
	* doc/xml/manual/build_hacking.xml: Switch gcc.gnu.org installation
	docs to https.
	* doc/html/manual/appendix_porting.html: Regenerate.
2025-08-07 17:36:25 +02:00
Jonathan Wakely
a3a83cea00 libstdc++: Remove Paolo from list of people to contact about contributing
Paolo has not been active for some time.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/appendix_contributing.xml: Remove Paolo from
	list of maintainers to contact about contributing.
	* doc/html/manual/appendix_contributing.html: Regenerate.
2025-07-18 17:46:28 +01:00
Jonathan Wakely
717e20dddd libstdc++: Document new generated header
libstdc++-v3/ChangeLog:

	* doc/xml/manual/build_hacking.xml: Document that
	windows_zones-map.h is a generated file.
	* doc/html/manual/appendix_porting.html: Regenerate.
2025-07-18 17:46:28 +01:00
Jonathan Wakely
2954038c82 libstdc++: Document change in __int128 traits [PRPR96710]
libstdc++-v3/ChangeLog:

	PR libstdc++/96710
	* doc/xml/manual/evolution.xml: Document change or __int128.
	* doc/html/manual/api.html: Regenerate.
2025-07-17 15:40:57 +01:00
Jonathan Wakely
905593af06 libstdc++: Improve documentation on copyright notices in new tests
Clarify that FSF copyright notices in tests are incorrect for
contributions under DCO terms. Clarify the sentence about copying
existing tests to clarify that it is only referring to copying the code
in the test file, rather than just copying an existing file as a
template for a new test.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/test.xml: Improve discussion of copyright
	notices in new test cases.
	* doc/html/manual/test.html: Regenerate.
2025-06-12 09:44:46 +01:00
Jonathan Wakely
db0cee881f libstdc++: Remove unused 'test' variables in test cases
These variables could be used by custom definitions of the VERIFY macro
prior to GCC 7.1 but serve no purpose now. They can be removed, along
with the documentation with the historical note.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/test.xml: Remove note about unused 'test'
	variables for old definition of VERIFY.
	* doc/html/manual/test.html: Regenerate.
	* testsuite/experimental/net/buffer/arithmetic.cc: Remove unused
	variable.
	* testsuite/experimental/net/buffer/const.cc: Likewise.
	* testsuite/experimental/net/buffer/mutable.cc: Likewise.
	* testsuite/experimental/net/buffer/size.cc: Likewise.
	* testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
	* testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
	* testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
	* testsuite/ext/special_functions/airy_ai/check_value.cc:
	Likewise.
	* testsuite/ext/special_functions/airy_bi/check_value.cc:
	Likewise.
	* testsuite/ext/special_functions/conf_hyperg/check_value.cc:
	Likewise.
	* testsuite/ext/special_functions/hyperg/check_value.cc:
	Likewise.
	* testsuite/special_functions/01_assoc_laguerre/check_value.cc:
	Likewise.
	* testsuite/special_functions/02_assoc_legendre/check_value.cc:
	Likewise.
	* testsuite/special_functions/02_assoc_legendre/pr86655.cc:
	Likewise.
	* testsuite/special_functions/03_beta/check_value.cc: Likewise.
	* testsuite/special_functions/04_comp_ellint_1/check_value.cc:
	Likewise.
	* testsuite/special_functions/05_comp_ellint_2/check_value.cc:
	Likewise.
	* testsuite/special_functions/06_comp_ellint_3/check_value.cc:
	Likewise.
	* testsuite/special_functions/07_cyl_bessel_i/check_value.cc:
	Likewise.
	* testsuite/special_functions/08_cyl_bessel_j/check_value.cc:
	Likewise.
	* testsuite/special_functions/09_cyl_bessel_k/check_value.cc:
	Likewise.
	* testsuite/special_functions/10_cyl_neumann/check_value.cc:
	Likewise.
	* testsuite/special_functions/11_ellint_1/check_value.cc:
	Likewise.
	* testsuite/special_functions/12_ellint_2/check_value.cc:
	Likewise.
	* testsuite/special_functions/13_ellint_3/check_value.cc:
	Likewise.
	* testsuite/special_functions/14_expint/check_value.cc:
	Likewise.
	* testsuite/special_functions/15_hermite/check_value.cc:
	Likewise.
	* testsuite/special_functions/16_laguerre/check_value.cc:
	Likewise.
	* testsuite/special_functions/17_legendre/check_value.cc:
	Likewise.
	* testsuite/special_functions/18_riemann_zeta/check_value.cc:
	Likewise.
	* testsuite/special_functions/19_sph_bessel/check_value.cc:
	Likewise.
	* testsuite/special_functions/20_sph_legendre/check_value.cc:
	Likewise.
	* testsuite/special_functions/20_sph_legendre/pr86655.cc:
	Likewise.
	* testsuite/special_functions/21_sph_neumann/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/01_assoc_laguerre/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/02_assoc_legendre/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/02_assoc_legendre/pr86655.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/03_beta/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/04_comp_ellint_1/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/05_comp_ellint_2/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/06_comp_ellint_3/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/07_conf_hyperg/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/08_cyl_bessel_i/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/09_cyl_bessel_j/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/10_cyl_bessel_k/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/11_cyl_neumann/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/12_ellint_1/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/13_ellint_2/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/14_ellint_3/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/15_expint/check_value_neg.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/17_hyperg/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/18_laguerre/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/19_legendre/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/20_riemann_zeta/check_value_neg.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/21_sph_bessel/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/22_sph_legendre/check_value.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/22_sph_legendre/pr86655.cc:
	Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/23_sph_neumann/check_value.cc:
	Likewise.

Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
2025-06-11 10:30:45 +01:00
Jonathan Wakely
ebbcd94e47 libstdc++: Document that -std cannot be used in --target_board now
Only using GLIBCXX_TESTSUITE_STDS or v3_std_list works now.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/test.xml: Remove outdated documentation on
	testing with -std options in --target_board.
	* doc/html/manual/test.html: Regenerate.
2025-05-29 11:48:46 +01:00
Jonathan Wakely
501e6e7866 libstdc++: Fix incorrect links to archived SGI STL docs
In r8-7777-g25949ee33201f2 I updated some URLs to point to copies of the
SGI STL docs in the Wayback Machine, because the original pags were no
longer hosted on sgi.com. However, I incorrectly assumed that if one
archived page was at https://web.archive.org/web/20171225062613/... then
all the other pages would be too. Apparently that's not how the Wayback
Machine works, and each page is archived on a different date. That meant
that some of our links were redirecting to archived copies of the
announcement that the SGI STL docs have gone away.

This fixes each URL to refer to a correctly archived copy of the
original docs.

libstdc++-v3/ChangeLog:

	* doc/xml/faq.xml: Update URL for archived SGI STL docs.
	* doc/xml/manual/containers.xml: Likewise.
	* doc/xml/manual/extensions.xml: Likewise.
	* doc/xml/manual/using.xml: Likewise.
	* doc/xml/manual/utilities.xml: Likewise.
	* doc/html/*: Regenerate.
2025-05-20 11:02:50 +01:00
Jonathan Wakely
6dbcbd96e9 libstdc++: Deprecate non-standard std::fabs(const complex<T>&) [PR120235]
There was an overload of fabs for std::complex in TR1 and in some C++0x
drafts, but it was removed from the working draft by LWG 595.

Since we've been providing it for decades we should deprecate it before
removing it.

libstdc++-v3/ChangeLog:

	PR libstdc++/120235
	* doc/html/*: Regenerate.
	* doc/xml/manual/evolution.xml: Document deprecation.
	* include/std/complex: Replace references to TR1 subclauses with
	corresponding C++11 subclauses.
	(fabs): Add deprecated attribute.
	* testsuite/26_numerics/complex/fabs_neg.cc: New test.

Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
2025-05-15 16:33:16 +01:00
Jonathan Wakely
203eb116ec libstdc++: Update C++23 status table
This should have been updated for the GCC 15.1 release.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2023.xml: Update status of proposals
	implemented after GCC 14.2 release.
	* doc/html/manual/status.html: Regenerate.
2025-05-12 12:26:53 +01:00
Jonathan Wakely
e0bcedba61 libstdc++: Update <charconv> rows in C++17 status table
Document that std::to_chars and std::from_chars are complete, mentioning
the libraries used for floating-point types.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2017.xml: Update status for
	std::to_chars and std::from_chars.
	* doc/html/manual/*: Regenerate.

Reviewed-by: Jakub Jelinek <jakub@redhat.com>
Reviewed-by: Björn Schäpers <gcc@hazardy.de>
2025-05-12 09:42:59 +01:00
Jonathan Wakely
dd35f66287 libstdc++: Document thread-safety for COW std::string [PR21334]
The gcc4-compatible copy-on-write std::string does not conform to the
C++11 requirements on data race avoidance in standard containers.
Specifically, calling non-const member functions such as begin() and
data() needs to do the "copy on write" operation and so is most
definitely a modification of the object. As such, those non-const
members must not be called concurrently with any other uses of the
string object.

libstdc++-v3/ChangeLog:

	PR libstdc++/21334
	* doc/xml/manual/using.xml: Document that container data race
	avoidance rules do not apply to COW std::string.
	* doc/html/*: Regenerate.
2025-04-14 13:13:11 +01:00
Jonathan Wakely
1e4d81aab2 libstdc++: Fix some broken links in the manual
libstdc++-v3/ChangeLog:

	* doc/xml/manual/policy_data_structures_biblio.xml: Fix two
	broken links.
	* doc/html/manual/policy_data_structures.html: Regenerate.
2025-03-24 21:57:56 +00:00
Jonathan Wakely
b93e60e790 libstdc++: Correct statement about default -std option
The default is -std=gnu++17 now, not -std=gnu++14.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/test.xml: Fix default for -std option.
	* doc/html/manual/test.html: Regenerate.
2025-03-19 23:29:06 +00:00
Jonathan Wakely
597ca24445 libstdc++: Add lambda example to case transformation docs
libstdc++-v3/ChangeLog:

	* doc/xml/manual/strings.xml: Tweak formatting. Add example
	using lambda.
	* doc/html/manual/strings.html: Regenerate.
2025-03-12 11:32:55 +00:00
Jonathan Wakely
ac16d6d74f libstdc++: Remove stray comma in testing docs
libstdc++-v3/ChangeLog:

	* doc/xml/manual/test.xml: Remove stray comma.
	* doc/html/manual/test.html: Regenerate.
2025-03-04 11:14:00 +00:00
Jonathan Wakely
720945e8bc libstdc++: Fix incorrect DocBook element in manual
libstdc++-v3/ChangeLog:

	* doc/xml/manual/evolution.xml: Replace invalid <variable>
	elements with <varname>.
	* doc/html/*: Regenerate.
2025-01-08 12:45:36 +00:00
Gerald Pfeifer
60ef4b9cc9 libstdc++: Delete further Profile Mode leftovers
Commit 544be2beb1 in 2019 remove Profile Mode and associated docs.
Now also remove generated HTML files.

libstdc++-v3:
	* doc/html/manual/profile_mode.html: Delete.
	* doc/html/manual/profile_mode_api.html: Ditto.
	* doc/html/manual/profile_mode_cost_model.html: Ditto.
	* doc/html/manual/profile_mode_design.html: Ditto.
	* doc/html/manual/profile_mode_devel.html: Ditto.
	* doc/html/manual/profile_mode_impl.html: Ditto.
2025-01-01 09:05:02 +08:00
Gerald Pfeifer
56dfadd185 libstdc++: Delete leftover from Profile Mode removal
Commit 544be2beb1 in 2019 remove Profile Mode and associated docs
including the XML version of profile_mode_diagnostics.html. Somehow
the latter survived until now. Simply delete it as well.

libstdc++-v3:
	* doc/html/manual/profile_mode_diagnostics.html: Delete.
2024-12-29 21:44:50 +08:00
Gerald Pfeifer
83e86397b0 libstdc++: Update reference to Angelika Langer's article
libstdc++-v3:
	* doc/xml/manual/allocator.xml: Update reference to Angelika
	Langer's article.
	* doc/html/manual/memory.html: Regenerate.
2024-11-18 08:33:49 +01:00
Gerald Pfeifer
696bd86260 libstdc++: Move a gcc.gnu.org link to https
libstdc++-v3:
	* doc/xml/manual/intro.xml: Move a gcc.gnu.org link to https.
	* doc/html/manual/license.html: Regenerate.
2024-11-17 12:36:29 +01:00
Gerald Pfeifer
6d52a568dd libstdc++: Update link to Angelika Langer's book
libstdc++-v3:
	* doc/xml/manual/io.xml: Update link to Angelika Langer's book.
	* doc/html/manual/streambufs.html: Regenerate.
2024-11-17 12:05:36 +01:00
Jonathan Wakely
01ba02caa9 libstdc++: Refactor std::hash specializations
This attempts to simplify and clean up our std::hash code. The primary
benefit is improved diagnostics for users when they do something wrong
involving std::hash or unordered containers. An additional benefit is
that for the unstable ABI (--enable-symvers=gnu-versioned-namespace) we
can reduce the memory footprint of several std::hash specializations.

In the current design, __hash_enum is a base class of the std::hash
primary template, but the partial specialization of __hash_enum for
non-enum types is disabled.  This means that if a user forgets to
specialize std::hash for their class type (or forgets to use a custom
hash function for unordered containers) they get error messages about
std::__hash_enum not being constructible.  This is confusing when there
is no enum type involved: why should users care about __hash_enum not
being constructible if they're not trying to hash enums?

This change makes the std::hash primary template only derive from
__hash_enum when the template argument type is an enum. Otherwise, it
derives directly from a new class template, __hash_not_enabled. This new
class template defines the deleted members that cause a given std::hash
specialization to be a disabled specialization (as per P0513R0). Now
when users try to use a disabled specialization, they get more
descriptive errors that mention __hash_not_enabled instead of
__hash_enum.

Additionally, adjust __hash_base to remove the deprecated result_type
and argument_type typedefs for C++20 and later.

In the current code we use a __poison_hash base class in the std::hash
specializations for std::unique_ptr, std::optional, and std::variant.
The primary template of __poison_hash has deleted special members, which
is used to conditionally disable the derived std::hash specialization.
This can also result in confusing diagnostics, because seeing "poison"
in an enabled specialization is misleading. Only some uses of
__poison_hash actually "poison" anything, i.e. cause a specialization to
be disabled. In other cases it's just an empty base class that does
nothing.

This change removes __poison_hash and changes the std::hash
specializations that were using it to conditionally derive from
__hash_not_enabled instead. When the std::hash specialization is
enabled, there is no more __poison_hash base class. However, to preserve
the ABI properties of those std::hash specializations, we need to
replace __poison_hash with some other empty base class. This is needed
because in the current code std::hash<std::variant<int, const int>> has
two __poison_hash<int> base classes, which must have unique addresses,
so sizeof(std::hash<std::variant<int, const int>>) == 2. To preserve
this unfortunate property, a new __hash_empty_base class is used as a
base class to re-introduce du0plicate base classes that increase the
class size. For the unstable ABI we don't use __hash_empty_base so the
std::hash<std::variant<T...>> specializations are always size 1, and
the class hierarchy is much simpler so will compile faster.

Additionally, remove the result_type and argument_type typedefs from all
disabled specializations of std::hash for std::unique_ptr,
std::optional, and std::variant. Those typedefs are useless for disabled
specializations, and although the standard doesn't say they must *not*
be present for disabled specializations, it certainly only requires them
for enabled specializations. Finally, for C++20 the typedefs are also
removed from enabled specializations of std::hash for std::unique_ptr,
std::optional, and std::variant.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/evolution.xml: Document removal of nested types
	from std::hash specializations.
	* doc/html/manual/api.html: Regenerate.
	* include/bits/functional_hash.h (__hash_base): Remove
	deprecated nested types for C++20.
	(__hash_empty_base): Define new class template.
	(__is_hash_enabled_for): Define new variable template.
	(__poison_hash): Remove.
	(__hash_not_enabled): Define new class template.
	(__hash_enum): Remove partial specialization for non-enums.
	(hash): Derive from __hash_not_enabled for non-enums, instead of
	__hash_enum.
	* include/bits/unique_ptr.h (__uniq_ptr_hash): Derive from
	__hash_base. Conditionally derive from __hash_empty_base.
	(__uniq_ptr_hash<>): Remove disabled specialization.
	(hash): Do not derive from __hash_base unconditionally.
	Conditionally derive from either __uniq_ptr_hash or
	__hash_not_enabled.
	* include/std/optional (__optional_hash_call_base): Remove.
	(__optional_hash): Define new class template.
	(hash): Derive from either
	(hash): Conditionally derive from either __optional_hash or
	__hash_not_enabled. Remove nested typedefs.
	* include/std/variant (_Base_dedup): Replace __poison_hash with
	__hash_empty_base.
	(__variant_hash_call_base_impl): Remove.
	(__variant_hash): Define new class template.
	(hash): Conditionally derive from either __variant_hash or
	__hash_not_enabled. Remove nested typedefs.
	* testsuite/20_util/optional/hash.cc: Check whether nested types
	are present.
	* testsuite/20_util/variant/hash.cc: Likewise.
	* testsuite/20_util/optional/hash_abi.cc: New test.
	* testsuite/20_util/unique_ptr/hash/abi.cc: New test.
	* testsuite/20_util/unique_ptr/hash/types.cc: New test.
	* testsuite/20_util/variant/hash_abi.cc: New test.
2024-11-13 20:21:41 +00:00
Jonathan Wakely
5c34f02ba7 libstdc++: Deprecate useless <cxxx> compatibility headers for C++17
These headers make no sense for C++ programs, because they either define
different content to the corresponding <xxx.h> C header, or define
nothing at all in namespace std. They were all deprecated in C++17, so
add deprecation warnings to them, which can be disabled with
-Wno-deprecated. For C++20 and later these headers are no longer in the
standard at all, so compiling with _GLIBCXX_USE_DEPRECATED defined to 0
will give an error when they are included.

Because #warning is non-standard before C++23 we need to use pragmas to
ignore -Wc++23-extensions for the -Wsystem-headers -pedantic case.

One g++ test needs adjustment because it includes <ciso646>, but that
can be made conditional on the __cplusplus value without any reduction
in test coverage.

For the library tests, consolidate the std_c++0x_neg.cc XFAIL tests into
the macros.cc test, using dg-error with a { target c++98_only }
selector. This avoids having two separate test files, one for C++98 and
one for everything later. Also add tests for the <xxx.h> headers to
ensure that they behave as expected and don't give deprecated warnings.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/evolution.xml: Document deprecations.
	* doc/html/*: Regenerate.
	* include/c_compatibility/complex.h (_GLIBCXX_COMPLEX_H): Move
	include guard to start of file. Include <complex> directly
	instead of <ccomplex>.
	* include/c_compatibility/tgmath.h: Include <cmath> and
	<complex> directly, instead of <ctgmath>.
	* include/c_global/ccomplex: Add deprecated #warning for C++17
	and #error for C++20 if _GLIBCXX_USE_DEPRECATED == 0.
	* include/c_global/ciso646: Likewise.
	* include/c_global/cstdalign: Likewise.
	* include/c_global/cstdbool: Likewise.
	* include/c_global/ctgmath: Likewise.
	* include/c_std/ciso646: Likewise.
	* include/precompiled/stdc++.h: Do not include ccomplex,
	ciso646, cstdalign, cstdbool, or ctgmath in C++17 and later.
	* testsuite/18_support/headers/cstdalign/macros.cc: Check for
	warnings and errors for unsupported dialects.
	* testsuite/18_support/headers/cstdbool/macros.cc: Likewise.
	* testsuite/26_numerics/headers/ctgmath/complex.cc: Likewise.
	* testsuite/27_io/objects/char/1.cc: Do not include <ciso646>.
	* testsuite/27_io/objects/wchar_t/1.cc: Likewise.
	* testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc: Removed.
	* testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc: Removed.
	* testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc: Removed.
	* testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc: Removed.
	* testsuite/18_support/headers/ciso646/macros.cc: New test.
	* testsuite/18_support/headers/ciso646/macros.h.cc: New test.
	* testsuite/18_support/headers/cstdbool/macros.h.cc: New test.
	* testsuite/26_numerics/headers/ccomplex/complex.cc: New test.
	* testsuite/26_numerics/headers/ccomplex/complex.h.cc: New test.
	* testsuite/26_numerics/headers/ctgmath/complex.h.cc: New test.

gcc/testsuite/ChangeLog:

	* g++.old-deja/g++.other/headers1.C: Do not include ciso646 for
	C++17 and later.
2024-11-06 12:47:19 +00:00
Jonathan Wakely
96566cc46d libstdc++: Fix some typos and grammatical errors in docs
Also remove some redundant 'void' parameters from code examples.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/using_exceptions.xml: Fix typos and grammatical
	errors.
	* doc/html/manual/using_exceptions.html: Regenerate.
2024-10-30 21:12:57 +00:00
Jonathan Wakely
4b0f238855 libstdc++: Add -D_GLIBCXX_ASSERTIONS default for -O0 to API history
libstdc++-v3/ChangeLog:

	* doc/xml/manual/evolution.xml: Document that assertions are
	enabled for unoptimized builds.
	* doc/html/*: Regenerate.
2024-10-23 16:01:04 +01:00
Jonathan Wakely
5a661ecdfb libstdc++: Add GLIBCXX_TESTSUITE_STDS example to docs
libstdc++-v3/ChangeLog:

	* doc/xml/manual/test.xml: Add GLIBCXX_TESTSUITE_STDS example.
	* doc/html/manual/test.html: Regenerate.
2024-10-23 15:59:55 +01:00
Jonathan Wakely
361d230fd7 libstdc++: Enable _GLIBCXX_ASSERTIONS by default for -O0 [PR112808]
Too many users don't know about -D_GLIBCXX_ASSERTIONS and so are missing
valuable checks for C++ standard library preconditions. This change
enables libstdc++ assertions by default when compiling with -O0 so that
we diagnose more bugs by default.

When users enable optimization we don't add the assertions by default
(because they have non-zero overhead) so they still need to enable them
manually.

For users who really don't want the assertions even in unoptimized
builds, defining _GLIBCXX_NO_ASSERTIONS will prevent them from being
enabled automatically.

libstdc++-v3/ChangeLog:

	PR libstdc++/112808
	* doc/xml/manual/using.xml (_GLIBCXX_ASSERTIONS): Document
	implicit definition for -O0 compilation.
	(_GLIBCXX_NO_ASSERTIONS): Document.
	* doc/html/manual/using_macros.html: Regenerate.
	* include/bits/c++config [!__OPTIMIZE__] (_GLIBCXX_ASSERTIONS):
	Define for unoptimized builds.
2024-10-09 13:39:16 +01:00
Jonathan Wakely
8230922230 libstdc++: Document missing features for old std:string ABI [PR116777]
There are several features that are not supported when using the old
std::string ABI. It's possible that PR 81967 will get fixed, but the
missing C++20 features almost certainly won't be. Document this in the
manual.

libstdc++-v3/ChangeLog:

	PR libstdc++/116777
	* doc/xml/manual/using.xml: Document features that are not
	supported for the gcc4-compatible ABI.
	* doc/html/manual/using_dual_abi.html: Regenerate.
2024-09-20 23:48:26 +01:00
Gerald Pfeifer
719edcba4d libstdc++: Update link to installation docs
libstdc++-v3:
	* doc/xml/manual/intro.xml: Update link to installation docs.
	* doc/html/manual/make.html: Regenerate.
2024-09-16 08:02:55 +07:00
Jonathan Wakely
1dde83f0ec libstdc++: Enable most of <chrono> for freestanding
This makes durations, time points and calendrical types available for
freestanding. The clocks and time zone utilities are disabled for
freestanding, as they require functions in the hosted lib.

Add support for a new macro _GLIBCXX_NO_FREESTANDING_CHRONO which can be
used to explicitly disable <chrono> for freestanding.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/using.xml (_GLIBCXX_NO_FREESTANDING_CHRONO):
	Document macro.
	* doc/html/*: Regenerate.
	* include/bits/chrono.h [_GLIBCXX_NO_FREESTANDING_CHRONO]:
	Only include <bits/require_hosted.h> when this macro is defined.
	[_GLIBCXX_HOSTED]: Only define clocks for hosted.
	* include/bits/version.def (chrono_udls): Remove hosted=yes.
	* include/bits/version.h: Regenerate.
	* include/std/chrono [_GLIBCXX_HOSTED]: Only define clocks and
	time zone utilities for hosted.
	* testsuite/std/time/freestanding.cc: New test.
2024-09-15 16:15:28 +01:00
Jonathan Wakely
a523d1b46b libstdc++: Update and clarify Doxygen version requirements in manual
There are lots of bugs that affect libstdc++ output from Doxygen, so
using 1.9.6 or later is recommended. Give a lower minimum, because some
distros still use 1.9.1 and that will work, albeit suboptimally.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/documentation_hacking.xml: Update minimum
	Doxygen version.
	* doc/html/*: Regenerate.
2024-08-23 22:10:46 +01:00