Commit Graph

15100 Commits (master)

Author SHA1 Message Date
GCC Administrator 0ab643555c Daily bump. 2024-05-31 00:17:38 +00:00
Alexandre Oliva 5955c18dfb [libstdc++-v3] [rtems] enable filesystem support
mkdir, chdir and chmod functions are defined in librtemscpu, that
doesn't get linked in during libstdc++-v3 configure, but applications
use -qrtems for linking, which brings those symbols in, so it makes
sense to mark them as available so that the C++ filesystem APIs are
enabled.


for  libstdc++-v3/ChangeLog

	* configure.ac [*-*-rtems*]: Set chdir, chmod and mkdir as
	available.
	* configure: Rebuilt.
2024-05-30 04:01:15 -03:00
GCC Administrator d815d9ad89 Daily bump. 2024-05-30 00:16:44 +00:00
François Dumont d22eaeca76 libstdc++: Use RAII to replace try/catch blocks
Move _Guard into std::vector declaration and use it to guard all calls to
vector _M_allocate.

Doing so the compiler has more visibility on what is done with the pointers
and do not raise anymore the -Wfree-nonheap-object warning.

libstdc++-v3/ChangeLog:

	* include/bits/vector.tcc (_Guard): Move all the nested duplicated class...
	* include/bits/stl_vector.h (_Guard_alloc): ...here and rename.
	(_M_allocate_and_copy): Use latter.
	(_M_initialize_dispatch): Small code simplification.
	(_M_range_initialize): Likewise and set _M_finish first from the result
	of __uninitialize_fill_n_a that can throw.
2024-05-29 16:42:50 +02:00
Rainer Orth a99ebb88f8 libstdc++: Build libbacktrace and 19_diagnostics/stacktrace with -funwind-tables [PR111641]
Several of the 19_diagnostics/stacktrace tests FAIL on Solaris/SPARC (32
and 64-bit), Solaris/x86 (32-bit only), and several other targets:

FAIL: 19_diagnostics/stacktrace/current.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/current.cc  -std=gnu++26 execution test
FAIL: 19_diagnostics/stacktrace/entry.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/entry.cc  -std=gnu++26 execution test
FAIL: 19_diagnostics/stacktrace/output.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/output.cc  -std=gnu++26 execution test
FAIL: 19_diagnostics/stacktrace/stacktrace.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/stacktrace.cc  -std=gnu++26 execution test

As it turns out, both the copy of libbacktrace in libstdc++ and the
testcases proper need to compiled with -funwind-tables, as is done for
libbacktrace itself.

This isn't an issue on Linux/x86_64 and Solaris/amd64 since 64-bit x86
always defaults to -funwind-tables.  32-bit x86 does, too, when
-fomit-frame-pointer is enabled as on Linux/i686, but unlike
Solaris/i386.

So this patch always enables the option both for the libbacktrace copy
and the testcases.

Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, and
x86_64-pc-linux-gnu.

2024-05-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	libstdc++-v3:
	PR libstdc++/111641
	* src/libbacktrace/Makefile.am (AM_CFLAGS): Add -funwind-tables.
	* src/libbacktrace/Makefile.in: Regenerate.

	* testsuite/19_diagnostics/stacktrace/current.cc (dg-options): Add
	-funwind-tables.
	* testsuite/19_diagnostics/stacktrace/entry.cc: Likewise.
	* testsuite/19_diagnostics/stacktrace/hash.cc: Likewise.
	* testsuite/19_diagnostics/stacktrace/output.cc: Likewise.
	* testsuite/19_diagnostics/stacktrace/stacktrace.cc: Likewise.
2024-05-29 10:08:07 +02:00
Matthias Kretz 241a6cc88d libstdc++: Avoid MMX return types from __builtin_shufflevector
This resolves a regression on i686 that was introduced with
r15-429-gfb1649f8b4ad50.

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>

libstdc++-v3/ChangeLog:

	PR libstdc++/115247
	* include/experimental/bits/simd.h (__as_vector): Don't use
	vector_size(8) on __i386__.
	(__vec_shuffle): Never return MMX vectors, widen to 16 bytes
	instead.
	(concat): Fix padding calculation to pick up widening logic from
	__as_vector.
2024-05-29 09:04:43 +02:00
GCC Administrator ee492101c2 Daily bump. 2024-05-24 00:17:25 +00:00
Patrick Palka 66d2a76dcf libstdc++: Implement ranges::concat_view from P2542R7
libstdc++-v3/ChangeLog:

	* include/bits/version.def (ranges_concat): Define.
	* include/bits/version.h: Regenerate.
	* include/std/ranges (__detail::__concat_reference_t): Define
	for C++26.
	(__detail::__concat_value_t): Likewise.
	(__detail::__concat_rvalue_reference_t): Likewise.
	(__detail::__concat_indirectly_readable_impl): Likewise.
	(__detail::__concat_indirectly_readable): Likewise.
	(__detail::__concatable): Likewise.
	(__detail::__all_but_last_common): Likewise.
	(__detail::__concat_is_random_access): Likewise.
	(__detail::__concat_is_bidirectional): Likewise.
	(__detail::__last_is_common): Likewise.
	(concat_view): Likewise.
	(__detail::__concat_view_iter_cat): Likewise.
	(concat_view::iterator): Likewise.
	(views::__detail::__can_concat_view): Likewise.
	(views::_Concat, views::concat): Likewise.
	* testsuite/std/ranges/concat/1.cc: New test.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
2024-05-23 18:03:56 -04:00
GCC Administrator 0c23f152a1 Daily bump. 2024-05-23 00:16:45 +00:00
Jonathan Wakely fd1a674ff5
libstdc++: Add [[nodiscard]] to some std::locale functions
libstdc++-v3/ChangeLog:

	* include/bits/locale_classes.h (locale::combine)
	(locale::name, locale::operator==, locale::operator!=)
	(locale::operator(), locale::classic): Add nodiscard
	attribute.
	* include/bits/locale_classes.tcc (has_facet, use_facet):
	Likewise.
	* testsuite/22_locale/locale/cons/12438.cc: Add dg-warning for
	nodiscard diagnostic.
	* testsuite/22_locale/locale/cons/2.cc: Cast use_facet
	expression to void, to suppress diagnostic.
	* testsuite/22_locale/locale/cons/unicode.cc: Likewise.
	* testsuite/22_locale/locale/operations/2.cc: Add dg-warning.
2024-05-22 23:11:32 +01:00
Jonathan Wakely 947a9c801e
libstdc++: Fix effects of combining locales [PR108323]
This fixes a bug in locale::combine where we fail to meet the standard's
requirement that the result is unnamed. It also implements two library
issues related to the names of combined locales (2295 and 3676).

libstdc++-v3/ChangeLog:

	PR libstdc++/108323
	* include/bits/locale_classes.tcc (locale(const locale&, Facet*)):
	Return a copy of the first argument when the facet pointer is
	null, as per LWG 2295.
	(locale::combine): Ensure the result is unnamed.
	* src/c++11/localename.cc (_M_replace_categories): Ignore
	whether the second locale has a name when cat == none, as per
	LWG 3676.
	* src/c++98/locale.cc (_M_install_facet): Use __builtin_expect
	to predict that the facet pointer is non-null.
	* testsuite/22_locale/locale/cons/names.cc: New test.
2024-05-22 23:10:05 +01:00
Jonathan Wakely b2fdd508d7
libstdc++: Guard use of sized deallocation [PR114940]
Clang does not enable -fsized-deallocation by default, which means it
can't compile our <stacktrace> and <generator> headers.

Make the __cpp_lib_generator macro depend on the compiler-defined
__cpp_sized_deallocation macro, and change <stacktrace> to use unsized
deallocation when __cpp_sized_deallocation isn't defined.

libstdc++-v3/ChangeLog:

	PR libstdc++/114940
	* include/bits/version.def (generator): Depend on
	__cpp_sized_deallocation.
	* include/bits/version.h: Regenerate.
	* include/std/stacktrace (_GLIBCXX_SIZED_DELETE): New macro.
	(basic_stacktrace::_Impl::_M_deallocate): Use it.
2024-05-22 23:10:05 +01:00
Jonathan Wakely 1a5e4dd837
libstdc++: Implement std::formatter<std:🧵:id> without <sstream> [PR115099]
The std:🧵:id formatter uses std::basic_ostringstream without
including <sstream>, which went unnoticed because the test for it uses
a stringstream to check the output is correct.

The fix implemented here is to stop using basic_ostringstream for
formatting thread::id and just use std::format instead.

As a drive-by fix, the formatter specialization is constrained to
require that the thread:🆔:native_handle_type can be formatted, to
avoid making the formatter ill-formed if the pthread_t type is not a
pointer or integer. Since non-void pointers can't be formatted, ensure
that we convert pointers to const void* for formatting. Make a similar
change to the existing operator<< overload so that in the unlikely case
that pthread_t is a typedef for char* we don't treat it as a
null-terminated string when inserting into a stream.

libstdc++-v3/ChangeLog:

	PR libstdc++/115099
	* include/bits/std_thread.h: Declare formatter as friend of
	thread::id.
	* include/std/thread (operator<<): Convert non-void pointers to
	void pointers for output.
	(formatter): Add constraint that thread::native_handle_type is a
	pointer or integer.
	(formatter::format): Reimplement without basic_ostringstream.
	* testsuite/30_threads/thread/id/output.cc: Check output
	compiles before <sstream> has been included.
2024-05-22 09:43:41 +01:00
Jonathan Wakely b33f44ca6c
libstdc++: Ensure std::variant relops convert to bool [PR115145]
Ensure that the result of comparing the variant alternatives is
converted to bool immediately rather than copied.

libstdc++-v3/ChangeLog:

	PR libstdc++/115145
	* include/std/variant (operator==, operator!=, operator<)
	(operator<=, operator>, operator>=): Add trailing-return-type to
	lambda expressions to trigger conversion to bool.
	* testsuite/20_util/variant/relops/115145.cc: New test.
2024-05-22 09:43:41 +01:00
GCC Administrator 8713d5eec2 Daily bump. 2024-05-19 18:15:28 +00:00
Björn Schäpers d4635b504c
libstdc++: detect DLLs on windows with <stacktrace>
libstdc++-v3/ChangeLog:

	* acinclude.m4 (GLIBCXX_ENABLE_BACKTACE): Add check for
	tlhelp32.h, matching libbacktrace.
	* config.h.in: Regenerate.
	* configure: Regenerate.

Signed-off-by: Björn Schäpers <bjoern@hazardy.de>
2024-05-17 14:45:19 +01:00
Jonathan Wakely c9e05b03c1
libstdc++: Fix typo in _Grapheme_cluster_view::_Iterator [PR115119]
libstdc++-v3/ChangeLog:

	PR libstdc++/115119
	* include/bits/unicode.h (_Iterator::operator++(int)): Fix typo
	in increment expression.
	* testsuite/ext/unicode/grapheme_view.cc: Check post-increment
	on view's iterator.
2024-05-17 13:46:48 +01:00
GCC Administrator 25456c0e6d Daily bump. 2024-05-16 00:17:25 +00:00
Jonathan Wakely 23ef0f68ad
libstdc++: Fix data race in std::basic_ios::fill() [PR77704]
The lazy caching in std::basic_ios::fill() updates a mutable member
without synchronization, which can cause a data race if two threads both
call fill() on the same stream object when _M_fill_init is false.

To avoid this we can just cache the _M_fill member and set _M_fill_init
early in std::basic_ios::init, instead of doing it lazily. As explained
by the comment in init, there's a good reason for doing it lazily. When
char_type is neither char nor wchar_t, the locale might not have a
std::ctype<char_type> facet, so getting the fill character would throw
an exception. The current lazy init allows using unformatted I/O with
such a stream, because the fill character is never needed and so it
doesn't matter if the locale doesn't have a ctype<char_type> facet. We
can maintain this property by only setting the fill character in
std::basic_ios::init if the ctype facet is present at that time. If
fill() is called later and the fill character wasn't set by init, we can
get it from the stream's current locale at the point when fill() is
called (and not try to cache it without synchronization). If the stream
hasn't been imbued with a locale that includes the facet when we need
the fill() character, then throw bad_cast at that point.

This causes a change in behaviour for the following program:

  std::ostringstream out;
  out.imbue(loc);
  auto fill = out.fill();

Previously the fill character would have been set when fill() is called,
and so would have used the new locale. This commit changes it so that
the fill character is set on construction and isn't affected by the new
locale being imbued later. This new behaviour seems to be what the
standard requires, and matches MSVC.

The new 27_io/basic_ios/fill/char/fill.cc test verifies that it's still
possible to use a std::basic_ios without the ctype<char_type> facet
being present at construction.

libstdc++-v3/ChangeLog:

	PR libstdc++/77704
	* include/bits/basic_ios.h (basic_ios::fill()): Do not modify
	_M_fill and _M_fill_init in a const member function.
	(basic_ios::fill(char_type)): Use _M_fill directly instead of
	calling fill(). Set _M_fill_init to true.
	* include/bits/basic_ios.tcc (basic_ios::init): Set _M_fill and
	_M_fill_init here instead.
	* testsuite/27_io/basic_ios/fill/char/1.cc: New test.
	* testsuite/27_io/basic_ios/fill/wchar_t/1.cc: New test.
2024-05-15 12:17:34 +01:00
Jonathan Wakely d08247b778
libstdc++: Rewrite std::variant comparisons without macros
libstdc++-v3/ChangeLog:

	* include/std/variant (__detail::__variant::__compare): New
	function template.
	(operator==, operator!=, operator<, operator>, operator<=)
	(operator>=): Replace macro definition with handwritten function
	calling __detail::__variant::__compare.
	(operator<=>): Call __detail::__variant::__compare.
2024-05-15 10:18:14 +01:00
Jonathan Wakely 99dd1be141
libstdc++: Give std::memory_order a fixed underlying type [PR89624]
Prior to C++20 this enum type doesn't have a fixed underlying type,
which means it can be modified by -fshort-enums, which then means the
HLE bits are outside the range of valid values for the type.

As it has a fixed type of int in C++20 and later, do the same for
earlier standards too. This is technically a change for C++17 down,
because the implicit underlying type (without -fshort-enums) was
unsigned before. I doubt it matters in practice. That incompatibility
already exists between C++17 and C++20 and nobody has noticed or
complained. Now at least the underlying type will be int for all -std
modes.

libstdc++-v3/ChangeLog:

	PR libstdc++/89624
	* include/bits/atomic_base.h (memory_order): Use int as
	underlying type.
	* testsuite/29_atomics/atomic/89624.cc: New test.
2024-05-15 10:18:14 +01:00
GCC Administrator 3700bd68d1 Daily bump. 2024-05-15 00:17:37 +00:00
Jonathan Wakely 6cc8698244
libstdc++: Guard dynamic_cast use in src/c++23/print.cc [PR115015]
Do not use dynamic_cast unconditionally, in case libstdc++ is built with
-fno-rtti.

libstdc++-v3/ChangeLog:

	PR libstdc++/115015
	* src/c++23/print.cc (__open_terminal(streambuf*)) [!__cpp_rtti]:
	Do not use dynamic_cast.
2024-05-14 14:34:58 +01:00
Jonathan Wakely 0a99ad5c52
libstdc++: Document when std::string::shrink_to_fit was added
This section can be misread to say that shrink_to_fit is available from
GCC 3.4, but it was added later.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/strings.xml: Clarify that GCC 4.5 added
	std::string::shrink_to_fit.
	* doc/html/manual/strings.html: Regenerate.
2024-05-14 14:30:01 +01:00
Jonathan Wakely ccc26a1af0
libstdc++: Fix typo in std::stacktrace::max_size [PR115063]
libstdc++-v3/ChangeLog:

	PR libstdc++/115063
	* include/std/stacktrace (basic_stacktrace::max_size): Fix typo
	in reference to _M_alloc member.
	* testsuite/19_diagnostics/stacktrace/stacktrace.cc: Check
	max_size() compiles.
2024-05-14 10:53:37 +01:00
GCC Administrator dd594aab7f Daily bump. 2024-05-14 00:16:36 +00:00
Matthias Kretz fb1649f8b4 libstdc++: Use __builtin_shufflevector for simd split and concat
Signed-off-by: Matthias Kretz <m.kretz@gsi.de>

libstdc++-v3/ChangeLog:

	PR libstdc++/114958
	* include/experimental/bits/simd.h (__as_vector): Return scalar
	simd as one-element vector. Return vector from single-vector
	fixed_size simd.
	(__vec_shuffle): New.
	(__extract_part): Adjust return type signature.
	(split): Use __extract_part for any split into non-fixed_size
	simds.
	(concat): If the return type stores a single vector, use
	__vec_shuffle (which calls __builtin_shufflevector) to produce
	the return value.
	* include/experimental/bits/simd_builtin.h
	(__shift_elements_right): Removed.
	(__extract_part): Return single elements directly. Use
	__vec_shuffle (which calls __builtin_shufflevector) to for all
	non-trivial cases.
	* include/experimental/bits/simd_fixed_size.h (__extract_part):
	Return single elements directly.
	* testsuite/experimental/simd/pr114958.cc: New test.
2024-05-13 13:39:47 +02:00
GCC Administrator d508d70836 Daily bump. 2024-05-09 10:58:01 +00:00
Jonathan Wakely 3f04f3939e
libstdc++: Fix handling of incomplete UTF-8 sequences in _Unicode_view
Eddie Nolan reported to me that _Unicode_view was not correctly
implementing the substitution of ill-formed subsequences with U+FFFD,
due to failing to increment the counter when the iterator reaches the
end of the sequence before a multibyte sequence is complete.  As a
result, the incomplete sequence was not completely consumed, and then
the remaining character was treated as another ill-formed sequence,
giving two U+FFFD characters instead of one.

To avoid similar mistakes in future, this change introduces a lambda
that increments the iterator and the counter together. This ensures the
counter is always incremented when the iterator is incremented, so that
we always know how many characters have been consumed.

libstdc++-v3/ChangeLog:

	* include/bits/unicode.h (_Unicode_view::_M_read_utf8): Ensure
	count of characters consumed is correct when the end of the
	input is reached unexpectedly.
	* testsuite/ext/unicode/view.cc: Test incomplete UTF-8
	sequences.
2024-05-07 14:47:50 +01:00
Jonathan Wakely 9927059bb8
libstdc++: Fix <memory> for -std=c++23 -ffreestanding [PR114866]
std::shared_ptr isn't declared for freestanding, so guard uses of it
with #if _GLIBCXX_HOSTED in <bits/out_ptr.h>.

libstdc++-v3/ChangeLog:

	PR libstdc++/114866
	* include/bits/out_ptr.h [!_GLIBCXX_HOSTED]: Don't refer to
	shared_ptr, __shared_ptr or __is_shred_ptr.
	* testsuite/20_util/headers/memory/114866.cc: New test.
2024-05-07 14:47:49 +01:00
Jonathan Wakely 6709e35457
libstdc++: Simplify std::variant comparison operators
libstdc++-v3/ChangeLog:

	* include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE):
	Simplify.
2024-05-07 14:44:36 +01:00
Jonathan Wakely b72e7addf8
libstdc++: Constrain equality ops for std::pair, std::tuple, std::variant
Implement the changes from P2944R3 which add constraints to the
comparison operators of std::pair, std::tuple, and std::variant.

The paper also changes std::optional, but we already constrain its
comparisons using SFINAE on the return type. However, we need some
additional constraints on the [optional.comp.with.t] operators that
compare an optional with a value. The paper doesn't say to do that, but
I think it's needed because otherwise when the comparison for two
optional objects fails its constraints, the two overloads that are
supposed to be for comparing to a non-optional become the best overload
candidates, but are ambiguous (and we don't even get as far as checking
the constraints for satisfaction). I reported LWG 4072 for this.

The paper does not change std::expected, but probably should have done.
I'll submit an LWG issue about that and implement it separately.

Also add [[nodiscard]] to all these comparison operators.

libstdc++-v3/ChangeLog:

	* include/bits/stl_pair.h (operator==): Add constraint.
	* include/bits/version.def (constrained_equality): Define.
	* include/bits/version.h: Regenerate.
	* include/std/optional: Define feature test macro.
	(__optional_rep_op_t): Use is_convertible_v instead of
	is_convertible.
	* include/std/tuple: Define feature test macro.
	(operator==, __tuple_cmp, operator<=>): Reimplement C++20
	comparisons using lambdas. Add constraints.
	* include/std/utility: Define feature test macro.
	* include/std/variant: Define feature test macro.
	(_VARIANT_RELATION_FUNCTION_TEMPLATE): Add constraints.
	(variant): Remove unnecessary friend declarations for comparison
	operators.
	* testsuite/20_util/optional/relops/constrained.cc: New test.
	* testsuite/20_util/pair/comparison_operators/constrained.cc:
	New test.
	* testsuite/20_util/tuple/comparison_operators/constrained.cc:
	New test.
	* testsuite/20_util/variant/relops/constrained.cc: New test.
	* testsuite/20_util/tuple/comparison_operators/overloaded.cc:
	Disable for C++20 and later.
	* testsuite/20_util/tuple/comparison_operators/overloaded2.cc:
	Remove dg-error line for target c++20.
2024-05-07 13:46:11 +01:00
Jonathan Wakely 9ebd123432
libstdc++: Use https instead of http in some comments
libstdc++-v3/ChangeLog:

	* include/backward/auto_ptr.h: Use https for URL in comment.
	* include/bits/basic_ios.h: Likewise.
	* include/std/iostream: Likewise.
2024-05-07 13:46:11 +01:00
Jonathan Wakely 6e25ca387f
libstdc++: Update ABI test to disallow adding to released symbol versions
If we update the list of "active" symbols versions now, rather than when
adding a new symbol version, we will notice if new symbols get added to
the wrong version (as in PR 114692).

libstdc++-v3/ChangeLog:

	* testsuite/util/testsuite_abi.cc: Update latest versions to
	new versions that should be used in future.
2024-05-07 13:46:11 +01:00
Rainer Orth 35b05a02de build: Derive object names in make_sunver.pl
The recent move of libgfortran object files to subdirs and the resulting
breakage of libgfortran.so symbol exports demonstrated how fragile
deriving object and archive names from their libtool counterparts in the
Makefiles is.  Therefore, this patch moves that step into
make_sunver.pl, considerably simplifying the Makefile rules to create
the version scripts.

Bootstrapped without regressions on i386-pc-solaris2.11 and
sparc-sun-solaris2.11, verifying that the version scripts are identical
except for the input filenames.

2024-05-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	contrib:
	* make_sunver.pl: Use File::Basename;
	Skip -lLIB args.
	Convert libtool object/archive names to underlying
	objects/archives.

	libatomic:
	* Makefile.am [LIBAT_BUILD_VERSIONED_SHLIB_SUN]
	(libatomic.map-sun): Pass $(libatomic_la_OBJECTS),
	$(libatomic_la_LIBADD) to make_sunver.pl unmodified.
	* Makefile.in: Regenerate.

	libffi:
	* Makefile.am [LIBFFI_BUILD_VERSIONED_SHLIB_SUN] (libffi.map-sun):
	Pass $(libffi_la_OBJECTS), $(libffi_la_LIBADD) to make_sunver.pl
	unmodified.
	* Makefile.in: Regenerate.

	libgfortran:
	* Makefile.am [LIBGFOR_USE_SYMVER_SUN} (gfortran.ver-sun): Pass
	$(libgfortran_la_OBJECTS), $(libgfortran_la_LIBADD) to
	make_sunver.pl unmodified.
	* Makefile.in: Regenerate.

	libgomp:
	* Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]
	(libgomp.ver-sun): Pass $(libgomp_la_OBJECTS),
	$(libgomp_la_LIBADD) to make_sunver.pl unmodified.
	* Makefile.in: Regenerate.

	libitm:
	* Makefile.am [LIBITM_BUILD_VERSIONED_SHLIB_SUN] (libitm.map-sun):
	Pass $(libitm_la_OBJECTS), $(libitm_la_LIBADD) to make_sunver.pl
	unmodified.
	* Makefile.in: Regenerate.

	libquadmath:
	* Makefile.am [LIBQUAD_USE_SYMVER_SUN] (quadmath.map-sun): Pass
	$(libquadmath_la_OBJECTS), $(libquadmath_la_LIBADD) to
	make_sunver.pl unmodified.
	* Makefile.in: Regenerate.

	libssp:
	* Makefile.am [LIBSSP_USE_SYMVER_SUN] (ssp.map-sun): Pass
	$(libssp_la_OBJECTS), $(libssp_la_LIBADD) to make_sunver.pl
	unmodified.
	* Makefile.in: Regenerate.

	libstdc++-v3:
	* src/Makefile.am [ENABLE_SYMVERS_SUN]
	(libstdc++-symbols.ver-sun): Pass $(libstdc___la_OBJECTS),
	$(libstdc___la_LIBADD) to make_sunver.pl unmodified.
	* src/Makefile.in: Regenerate.
2024-05-07 13:14:05 +02:00
Rainer Orth f68e90a0fe Remove obsolete Solaris 11.3 support
Support for Solaris 11.3 had already been obsoleted in GCC 13.  However,
since the only Solaris system in the cfarm was running 11.3, I've kept
it in tree until now when both Solaris 11.4/SPARC and x86 systems have
been added.

This patch actually removes the Solaris 11.3 support.  Apart from
several minor simplifications, there are two more widespread changes:

* In Solaris 11.4, libsocket and libnsl were folded into libc, so
  there's no longer a need to link them explictly.

* Since Solaris 11.4, Solaris includes all crts needed by gcc (like
  crt1.o and gcrt1.o) with the base system.  All workarounds to provide
  fallbacks can thus go.

Bootstrapped without regressions on i386-pc-solaris2.11 and
sparc-sun-solaris2.11 (as/ld, gas/ld, and gas/gld) as well as Solaris
11.3/x86 to ascertain that version is actually rejected.

2024-04-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	c++tools:
	* configure.ac (ax_lib_socket_nsl.m4): Don't sinclude.
	(AX_LIB_SOCKET_NSL): Don't call.
	(NETLIBS): Remove.
	* configure: Regenerate.
	* Makefile.in (NETLIBS): Remove.
	(g++-mapper-server$(exeext)): Remove $(NETLIBS).

	gcc:
	* config.gcc: Move *-*-solaris2.11.[0-3]* to unsupported list.
	<*-*-solaris2*> (default_use_cxa_atexit): Set unconditionally.
	* configure.ac (AX_LIB_SOCKET_NSL): Don't call.
	(NETLIBS): Remove.
	(gcc_cv_ld_aligned_shf_merge): Remove.
	(hidden_linkonce) <i?86-*-solaris2* | x86_64-*-solaris2*>: Remove.
	(gcc_cv_target_dl_iterate_phdr) <*-*-solaris2*>: Always set to yes.
	* Makefile.in (NETLIBS): Remove.
	* configure, config.in, aclocal.m4: Regenerate.
	* config/sol2.h: Don't check HAVE_SOLARIS_CRTS.
	(STARTFILE_SPEC): Remove !HAVE_SOLARIS_CRTS case.
	[USE_GLD] (LINK_EH_SPEC): Remove TARGET_DL_ITERATE_PHDR guard.
	* config/i386/i386.cc (USE_HIDDEN_LINKONCE): Remove guard.
	* varasm.cc (mergeable_string_section): Remove
	HAVE_LD_ALIGNED_SHF_MERGE handling.
	(mergeable_constant_section): Likewise.

	* doc/install.texi (Specific,i?86-*-solaris2*): Reference Solaris
	11.4 only.
	(Specific, *-*-solaris2*): Document Solaris 11.3 removal.  Remove
	11.3 references and caveats.  Update for 11.4.

	gcc/cp:
	* Make-lang.in (cc1plus$(exeext)): Remove $(NETLIBS).

	gcc/objcp:
	* Make-lang.in (cc1objplus$(exeext)): Remove $(NETLIBS).

	gcc/testsuite:
	* lib/target-supports.exp (check_effective_target_pie): Always
	enable on *-*-solaris2*.

	libgcc:
	* configure.ac <*-*-solaris2*> (libgcc_cv_solaris_crts): Remove.
	* config.host <*-*-solaris2*>: Remove !libgcc_cv_solaris_crts
	support.
	* configure, config.in: Regenerate.
	* config/sol2/gmon.c (internal_mcount) [!HAVE_SOLARIS_CRTS]: Remove.
	* config/i386/sol2-c1.S, config/sparc/sol2-c1.S: Remove.
	* config/sol2/t-sol2 (crt1.o, gcrt1.o): Remove.

	libstdc++-v3:
	* testsuite/lib/dg-options.exp (add_options_for_net_ts)
	<*-*-solaris2*>: Don't link with -lsocket -lnsl.
2024-05-07 10:45:55 +02:00
GCC Administrator 3e3d115c94 Daily bump. 2024-05-04 00:16:30 +00:00
Andreas Schwab 212d93f4b3 libstdc++: Update powerpc-linux-gnu baseline_symbols
* config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2024-05-03 13:14:13 +02:00
GCC Administrator fd48e674fd Daily bump. 2024-05-02 00:17:09 +00:00
Jonathan Wakely 1fbe1a50d8
libstdc++: Guard uses of is_pointer_interconvertible_v [PR114891]
This type trait isn't supported by Clang 18. It's only used in static
assertions, so they can just be omitted if the trait isn't available.

libstdc++-v3/ChangeLog:

	PR libstdc++/114891
	* include/std/generator: Check feature test macro before using
	is_pointer_interconvertible_v.
2024-05-01 17:24:01 +01:00
GCC Administrator 610415bb7d Daily bump. 2024-05-01 00:17:56 +00:00
Christophe Lyon 6d4593a178 Fix pretty printers regexp for GDB output
GDB emits end of lines as \r\n, we currently match any >0 number of
either \n or \r, possibly leading to mismatches under racy conditions.

I noticed this while running the GCC testsuite using the equivalent of
GDB's READ1 feature [1] which helps detecting bufferization issues.

We try to match
\n$1 = empty std::tuple\r

against {^(type|\$([0-9]+)) = ([^\n\r]*)[\n\r]+} which fails because
of the leading \n (which was left in the buffer after the previous
"skipping" pattern matched the preceding \r).

This patch accepts any number of leading \n and/or \r in the "got" clause.

Also take this opportunity to quote \r and \r in the logs, to make
debugging such issues easier.

Tested on aarch64-linux-gnu.

[1] https//github.com/bminor/binutils-gdb/blob/master/gdb/testsuite/README#L269

2024-01-24  Christophe Lyon  <christophe.lyon@linaro.org>

	libstdc++-v3/
	* testsuite/lib/gdb-test.exp (gdb-test): Fix regexp.  Quote
	newlines in logs.
2024-04-30 08:59:08 +00:00
GCC Administrator 42d2e2f57e Daily bump. 2024-04-30 00:17:28 +00:00
Rainer Orth f795049a82 libstdc++: Update Solaris baselines for GCC 14.0
This patch updates the Solaris baselines for the GLIBCXX_3.4.33 version
added in GCC 14.0.

Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11 (32 and 64-bit
each), together with the GLIBCXX_3.4.32 update, on both gcc-14 branch
and trunk.

2024-04-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	libstdc++-v3:
	* config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
	* config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
	Likewise.
	* config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
	* config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
	Likewise.

(cherry picked from commit 330c04dc53)
2024-04-29 14:34:54 +02:00
Rainer Orth 96b6ad7d57 libstdc++: Update Solaris baselines for GCC 13.2
This patch updates the Solaris baselines for the GLIBCXX_3.4.32 version
added in GCC 13.2.

Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11 (32 and 64-bit
each) on the gcc-13 branch and (together with the GLIBCXX_3.4.33 update)
on both gcc-14 branch and trunk.

2024-04-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	libstdc++-v3:
	* config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
	* config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
	Likewise.
	* config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
	* config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
	Likewise.

(cherry picked from commit 3e1ca51284)
2024-04-29 14:32:59 +02:00
GCC Administrator 2781d8090e Daily bump. 2024-04-27 00:18:05 +00:00
Jonathan Wakely a0bc71e480
libstdc++: Do not apply localized formatting to NaN and inf [PR114863]
We don't want to add grouping to strings like "-inf", and there is no
radix character to replace either.

libstdc++-v3/ChangeLog:

	PR libstdc++/114863
	* include/std/format (__formatter_fp::format): Only use
	_M_localized for finite values.
	* testsuite/std/format/functions/format.cc: Check localized
	formatting of NaN and initiny.
2024-04-26 15:57:38 +01:00
Jonathan Wakely 772250a36c
libstdc++: Adjust whitespace in status tables in manual
This simplifies the changes needed after branching for a new release, so
that new line breaks don't need to be introduced every time we branch.

libstdc++-v3/ChangeLog:

	* doc/html/manual/status.html: Regenerate.
	* doc/xml/manual/status_cxx1998.xml: Adjust whitespace.
	* doc/xml/manual/status_cxx2011.xml: Likewise.
	* doc/xml/manual/status_cxx2014.xml: Likewise.
	* doc/xml/manual/status_cxx2017.xml: Likewise.
	* doc/xml/manual/status_cxx2020.xml: Likewise.
	* doc/xml/manual/status_cxx2023.xml: Likewise.
	* doc/xml/manual/status_cxxtr1.xml: Likewise.
	* doc/xml/manual/status_cxxtr24733.xml: Likewise.
2024-04-26 11:50:10 +01:00
GCC Administrator 9353f6f475 Daily bump. 2024-04-26 00:16:42 +00:00
Jonathan Wakely 8d80e3c5a6
libstdc++: Rename man pages to use '::' instead of '_'
The Doxygen-generated man pages for some new types need to be renamed to
use '::' instead of '_' in the filenames.

libstdc++-v3/ChangeLog:

	* scripts/run_doxygen: Rename man pages for nested types.
2024-04-25 18:38:44 +01:00