Commit Graph

12771 Commits

Author SHA1 Message Date
GCC Administrator
2467998373 Daily bump. 2021-10-01 00:16:27 +00:00
Jonathan Wakely
c5369961fa libstdc++: Fix preprocessor check for C++17
libstdc++-v3/ChangeLog:

	* include/bits/regex.h (basic_regex::multiline): Fix #if
	condition.
2021-09-30 09:00:22 +01:00
GCC Administrator
d238146e41 Daily bump. 2021-09-30 00:16:20 +00:00
Jonathan Wakely
f38cd3bdb4 libstdc++: Implement std::regex_constants::multiline (LWG 2503)
This implements LWG 2503, which allows ^ and $ to match line terminator
characters, rather than only matching the beginning and end of the
entire input. The multiline option is only valid for ECMAScript, but
for other grammars we ignore it rather than throwing an exception.

This is related to PR libstdc++/102480, which incorrectly said that
ECMAscript should match the beginning of a line when match_prev_avail
is used. I think that's only supposed to happen when multiline is used.

The new regex_constants::multiline and basic_regex::multiline constants
are not defined for strict -std=c++11 and -std=c++14 modes, but
regex_constants::__multiline is always defined, so that the
implementation can use it internally.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/regex.h (basic_regex::multiline): Define constant
	for C++17.
	* include/bits/regex_constants.h (regex_constants::multiline):
	Define constant for C++17.
	(regex_constants::__multiline): Define duplicate constant for
	internal use in C++11 and C++14.
	* include/bits/regex_executor.h (_Executor::_M_match_multiline()):
	New member function.
	(_Executor::_M_is_line_terminator(_CharT)): New member function.
	(_Executor::_M_at_begin(), _Executor::_M_at_end()): Use new
	member functions to support multiline matches.
	* testsuite/28_regex/algorithms/regex_match/multiline.cc: New test.
2021-09-29 13:48:19 +01:00
Jonathan Wakely
9ca4c42a3b libstdc++: Check for invalid syntax_option_type values in <regex>
The standard says that it is invalid for more than one grammar element
to be set in a value of type regex_constants::syntax_option_type. This
adds a check in the regex compiler andthrows an exception if an invalid
value is used.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/regex_compiler.h (_Compiler::_S_validate): New
	function.
	* include/bits/regex_compiler.tcc (_Compiler::_Compiler): Use
	_S_validate to check flags.
	* include/bits/regex_error.h (_S_grammar): New error code for
	internal use.
	* testsuite/28_regex/basic_regex/ctors/grammar.cc: New test.
2021-09-29 13:48:15 +01:00
Jonathan Wakely
b701e1f8f6 libstdc++: std::basic_regex should treat '\0' as an ordinary char [PR84110]
When the input sequence contains a _CharT(0) character, the strchr call
in _Scanner<_CharT>::_M_scan_normal() will search for '\0' and so return
a pointer to the terminating null at the end of the string. This makes
the scanner think it's found a special character. Because it doesn't
match any of the actual special characters, we fall off the end of the
function (or assert in debug mode).

We should check for a null character explicitly and either treat it as
an ordinary character (for the ECMAScript grammar) or an error (for all
others). I'm not 100% sure that's right, but it seems consistent with
the POSIX RE rules where a '\0' means the end of the regex pattern or
the end of the sequence being matched.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	PR libstdc++/84110
	* include/bits/regex_error.h (regex_constants::_S_null): New
	error code for internal use.
	* include/bits/regex_scanner.tcc (_Scanner::_M_scan_normal()):
	Check for null character.
	* testsuite/28_regex/basic_regex/84110.cc: New test.
2021-09-29 13:48:11 +01:00
Jonathan Wakely
b59be1adba libstdc++: Simplify std::basic_regex construction and assignment
Introduce a new _M_compile function which does the common work needed by
all constructors and assignment. Call that directly to avoid multiple
levels of constructor delegation or calls to basic_regex::assign
overloads.

For assignment, there is no need to construct a std::basic_string if we
already have a contiguous sequence of the correct character type, and no
need to construct a temporary basic_regex when assigning from an
existing basic_regex.

Also define the copy and move assignment operators as defaulted, which
does the right thing without constructing a temporary and swapping it.
Copying or moving the shared_ptr member cannot fail, so they can be
noexcept. The assign(const basic_regex&) and assign(basic_regex&&)
member can then be defined in terms of copy or move assignment.

The new _M_compile function takes pointer arguments, so the caller has
to convert arbitrary iterator ranges into a contiguous sequence of
characters. With that simplification, the __compile_nfa helpers are not
needed and can be removed.

This also fixes a bug where construction from a contiguous sequence with
the wrong character type would fail to compile, rather than converting
the elements to the regex character type.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/regex.h (__detail::__is_contiguous_iter): Move
	here from <bits/regex_compiler.h>.
	(basic_regex::_M_compile): New function to compile an NFA from
	a regular expression string.
	(basic_regex::basic_regex): Use _M_compile instead of delegating
	to other constructors.
	(basic_regex::operator=(const basic_regex&)): Define as
	defaulted.
	(basic_regex::operator=(initializer_list<C>)): Use _M_compile.
	(basic_regex::assign(const basic_regex&)): Use copy assignment.
	(basic_regex::assign(basic_regex&&)): Use move assignment.
	(basic_regex::assign(const C*, flag_type)): Use _M_compile
	instead of constructing a temporary string.
	(basic_regex::assign(const C*, size_t, flag_type)): Likewise.
	(basic_regex::assign(const basic_string<C,T,A>&, flag_type)):
	Use _M_compile instead of constructing a temporary basic_regex.
	(basic_regex::assign(InputIter, InputIter, flag_type)): Avoid
	constructing a temporary string for contiguous iterators of the
	right value type.
	* include/bits/regex_compiler.h (__is_contiguous_iter): Move to
	<bits/regex.h>.
	(__enable_if_contiguous_iter, __disable_if_contiguous_iter)
	(__compile_nfa): Remove.
	* testsuite/28_regex/basic_regex/assign/exception_safety.cc: New
	test.
	* testsuite/28_regex/basic_regex/ctors/char/other.cc: New test.
2021-09-29 13:48:02 +01:00
GCC Administrator
fd1334791e Daily bump. 2021-09-29 00:16:26 +00:00
Jonathan Wakely
2fcfc7d668 libstdc++: Fix return values for atomic wait on futex
This fixes a logic error in the futex-based timed wait.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/atomic_timed_wait.h (__platform_wait_until_impl):
	Return false for ETIMEDOUT and true otherwise.
2021-09-28 21:27:04 +01:00
François Dumont
26c09ae12d libstdc++: Fix 48631_neg test in _GLIBCXX_INLINE_VERSION mode
libstdc++-v3/ChangeLog:

	* testsuite/20_util/default_delete/48631_neg.cc: Adapt dg-prune-output message
	to also match message with '__8' in it.
2021-09-28 22:09:48 +02:00
Jonathan Wakely
c44c5f3d9f libstdc++: Remove obfuscating typedefs in <regex>
There is no benefit to using _SizeT instead of size_t, and IterT tells
you less about the type than const _CharT*. This removes some unhelpful
typedefs.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/regex_automaton.h (_NFA_base::_SizeT): Remove.
	* include/bits/regex_compiler.h (_Compiler::_IterT): Remove.
	* include/bits/regex_compiler.tcc: Likewise.
	* include/bits/regex_scanner.h (_Scanner::_IterT): Remove.
	* include/bits/regex_scanner.tcc: Likewise.
2021-09-28 20:38:58 +01:00
Jonathan Wakely
b5f276b8c7 libstdc++: Tweaks to <regex> to avoid warnings
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/regex_compiler.tcc: Add line break in empty while
	statement.
	* include/bits/regex_executor.tcc: Avoid unused parameter
	warning.
2021-09-28 20:38:58 +01:00
Jonathan Wakely
df0dd04b78 libstdc++: Add noexcept to functions in <regex>
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/regex.h (basic_regex, swap): Add noexcept to
	non-throwing functions.
	* include/bits/regex_automaton.h (_State_base, _State)
	(_NFA_base): Likewise.
	* include/bits/regex_compiler.h (_Compiler): Likewise.
	* include/bits/regex_error.h (regex_error::code()): Likewise.
	* include/bits/regex_scanner.h (_Scanner): Likewise.
2021-09-28 20:38:57 +01:00
Jonathan Wakely
aeaea265ce libstdc++: Define macro before it is first checked
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/atomic_wait.h (_GLIBCXX_HAVE_PLATFORM_WAIT):
	Define before first attempt to check it.
2021-09-28 20:30:59 +01:00
Jonathan Wakely
07fbdd7bda libstdc++: Skip container adaptor tests that fail concept checks
As an extension, our container adaptors SFINAE away the default
constructor if the adapted sequence container is not default
constructible. When _GLIBCXX_CONCEPT_CHECKS is defined we enforce that
the sequence is default constructible, so the tests for the extension
fail. This disables the relevant parts of the tests.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* testsuite/23_containers/priority_queue/requirements/explicit_instantiation/1.cc:
	Do not check non-default constructible sequences when
	_GLIBCXX_CONCEPT_CHECKS is defined.
	* testsuite/23_containers/priority_queue/requirements/explicit_instantiation/1_c++98.cc:
	Likewise.
	* testsuite/23_containers/queue/requirements/explicit_instantiation/1.cc:
	Likewise.
	* testsuite/23_containers/queue/requirements/explicit_instantiation/1_c++98.cc:
	Likewise.
	* testsuite/23_containers/stack/requirements/explicit_instantiation/1.cc:
	Likewise.
	* testsuite/23_containers/stack/requirements/explicit_instantiation/1_c++98.cc:
	Likewise.
2021-09-28 20:22:51 +01:00
Jonathan Wakely
b701f46ea6 libstdc++: Skip tests that fail with _GLIBCXX_CONCEPT_CHECKS
The extension that allows implicitly rebinding a container's allocator
is not allowed when _GLIBCXX_CONCEPT_CHECKS is defined, so skip the
tests for that extension.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* testsuite/23_containers/deque/requirements/explicit_instantiation/3.cc:
	Do not test implicit allocator rebinding when _GLIBCXX_CONCEPT_CHECKS
	is defined.
	* testsuite/23_containers/forward_list/requirements/explicit_instantiation/3.cc:
	Likewise.
	* testsuite/23_containers/list/requirements/explicit_instantiation/3.cc:
	Likewise.
	* testsuite/23_containers/list/requirements/explicit_instantiation/5.cc:
	Likewise.
	* testsuite/23_containers/map/requirements/explicit_instantiation/3.cc:
	Likewise.
	* testsuite/23_containers/map/requirements/explicit_instantiation/5.cc:
	Likewise.
	* testsuite/23_containers/multimap/requirements/explicit_instantiation/3.cc:
	Likewise.
	* testsuite/23_containers/multimap/requirements/explicit_instantiation/5.cc:
	Likewise.
	* testsuite/23_containers/multiset/requirements/explicit_instantiation/3.cc:
	Likewise.
	* testsuite/23_containers/multiset/requirements/explicit_instantiation/5.cc:
	Likewise.
	* testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
	Likewise.
	* testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
	Likewise.
	* testsuite/23_containers/unordered_map/requirements/explicit_instantiation/3.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/3.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/3.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/requirements/explicit_instantiation/3.cc:
	Likewise.
	* testsuite/23_containers/vector/ext_pointer/explicit_instantiation/3.cc:
	Likewise.
	* testsuite/23_containers/vector/requirements/explicit_instantiation/3.cc:
	Likewise.
2021-09-28 20:22:51 +01:00
Jonathan Wakely
afffc96a52 libstdc++: Fix concept checks for iterators
This adds some additional checks the the C++98-style concept checks for
iterators, and removes some bogus checks for mutable iterators. Instead
of requiring that the result of dereferencing a mutable iterator is
assignable (which is a property of the value type, not required for the
iterator) check that the reference type is a non-const reference to the
value type.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/boost_concept_check.h (_ForwardIteratorConcept)
	(_BidirectionalIteratorConcept, _RandomAccessIteratorConcept):
	Check result types of iterator operations.
	(_Mutable_ForwardIteratorConcept): Check that iterator's
	reference type is a reference to its value type.
	(_Mutable_BidirectionalIteratorConcept): Do not require the
	value type to be assignable.
	(_Mutable_RandomAccessIteratorConcept): Likewise.
	* testsuite/24_iterators/operations/prev_neg.cc: Adjust dg-error
	line number.
2021-09-28 20:22:51 +01:00
Jonathan Wakely
5f1db7627f libstdc++: Improve types used as iterators in testsuite
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* testsuite/25_algorithms/copy/34595.cc: Add missing operation
	for type used as an iterator.
	* testsuite/25_algorithms/unique_copy/check_type.cc: Likewise.
2021-09-28 20:22:51 +01:00
Jonathan Wakely
4000d722e6 libstdc++: Fix tests that use invalid types in ordered containers
Types used in ordered containers need to be comparable, or the container
needs to use a custom comparison function. These tests fail when
_GLIBCXX_CONCEPT_CHECKS is defined, because the element types aren't
comparable.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* testsuite/20_util/is_nothrow_swappable/value.h: Use custom
	comparison function for priority_queue of type with no
	relational operators.
	* testsuite/20_util/is_swappable/value.h: Likewise.
	* testsuite/24_iterators/output/concept.cc: Add operator< to
	type used in set.
2021-09-28 20:22:51 +01:00
Jonathan Wakely
45a8cd2569 libstdc++: Fix _OutputIteratorConcept checks in algorithms
The _OutputIteratorConcept should be checked using the correct value
category. The std::move_backward and std::copy_backward algorithms
should use _OutputIteratorConcept instead of _ConvertibleConcept.

In order to use the correct value category, the concept should use a
function that returns _ValueT instead of using an lvalue data member.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/boost_concept_check.h (_OutputIteratorConcept):
	Use a function to preserve value category of the type.
	* include/bits/stl_algobase.h (copy, move, fill_n): Use a
	reference as the second argument for _OutputIteratorConcept.
	(copy_backward, move_backward): Use _OutputIteratorConcept
	instead of _ConvertibleConcept.
2021-09-28 20:22:50 +01:00
Jonathan Wakely
82626be2d6 libstdc++: Specialize std::pointer_traits<__normal_iterator<I,C>>
This allows std::__to_address to be used with __normal_iterator in
C++11/14/17 modes. Without the partial specialization the deduced
pointer_traits::element_type is incorrect, and so the return type of
__to_address is wrong.

A similar partial specialization is probably needed for
__gnu_debug::_Safe_iterator.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/stl_iterator.h (pointer_traits): Define partial
	specialization for __normal_iterator.
	* testsuite/24_iterators/normal_iterator/to_address.cc: New test.
2021-09-28 20:22:50 +01:00
Jonathan Wakely
a11052d98d libstdc++: Improve std::forward static assert message
The previous message told you something was wrong, but not why it
happened or why it's bad. This changes it to explain that the function
is being misused.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/move.h (forward(remove_reference_t<T>&&)):
	Improve text of static_assert.
	* testsuite/20_util/forward/c_neg.cc: Adjust dg-error.
	* testsuite/20_util/forward/f_neg.cc: Likewise.
2021-09-28 17:30:05 +01:00
Jonathan Wakely
f2b7f56a15 libstdc++: Fix mismatched noexcept-specifiers in filesystem::path [PR102499]
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	PR libstdc++/102499
	* include/bits/fs_path.h (path::begin, path::end): Add noexcept
	to declarations, to match definitions.
2021-09-28 17:30:05 +01:00
GCC Administrator
9a4293ed9b Daily bump. 2021-09-25 00:16:20 +00:00
Jonathan Wakely
9b11107ed7 libstdc++: Remove redundant 'inline' specifiers
These functions are constexpr, which means they are implicitly inline.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/range_access.h (cbegin, cend): Remove redundant
	'inline' specifier.
2021-09-24 15:38:44 +01:00
GCC Administrator
391b23e02b Daily bump. 2021-09-24 00:16:23 +00:00
Jonathan Wakely
43358e91bd libstdc++: Remove c++20-specific dg-error directives in test
I added extra dg-error directives for C++20 to match the extra errors
caused by some of the call stack being constexpr in C++20. Since Jason's
changes to reduce those errors, those dg-error lines no longer match.
This removes them again.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc:
	Remove dg-error lines for C++20-only errors.
2021-09-23 16:07:39 +01:00
Jonathan Wakely
8fa90926e0 libstdc++: Disable PCH for test that depends on a macro being defined
This test tries to ensure that <system_error> can be included after
defining _XOPEN_SOURCE=600, which doesn't test anything if that header
is already included via the <bits/stdc++.h> PCH before the macro
definition. Disable PCH so that it behaves as intended.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* testsuite/19_diagnostics/headers/system_error/93151.cc:
	Disable PCH.
2021-09-23 16:07:39 +01:00
Jonathan Wakely
477897451e libstdc++: Make std::system_category() recognize Windows error codes
The std::system_category error category should be used for
system-specific error codes, which means on Windows it should be used
for Windows error codes.  Currently that category assumes that the error
numbers it deals with are errno numbers, which means that
ERROR_ACCESS_DENIED (which has value 0x5) gets treated as whichever
errno number happens to have that value (EIO on mingw32-w64).

This adds a mapping from known Windows error codes to generic errno
ones. This means we correctly treat ERROR_ACCESS_DENIED as corresponding
to EACCES.

Also make std::system_category().message(int) return the right message
for Windows errors, by using FormatMessage instead of strerror. The
output of FormatMessage includes ".\r\n" at the end, so we strip that
off to allow the message to be used in contexts where that would be
problematic.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* src/c++11/system_error.cc (system_error_category) [_WIN32]:
	Map Windows error codes to generic POSIX error numbers. Use
	FormatMessage instead of strerror.
	* testsuite/19_diagnostics/error_category/system_category.cc:
	Adjust for new behaviour on Windows.
2021-09-23 16:07:39 +01:00
Jonathan Wakely
dd396a321b libstdc++: Improvements to standard error category objects
This ensures that the objects returned by std::generic_category() and
std::system_category() are initialized before any code starts executing,
and are not destroyed at the end of the program. This means it is always
safe to access them, even during startup and termination. See LWG 2992
and P1195R0 for further discussion of this.

Additionally, make the types of those objects final, which might
potentially allow additional devirtualization opportunities. The types
are not visible to users, so there is no way they can derive from them,
so making them final has no semantic change.

Finally, add overrides for equivalent(int, const error_condition&) to
those types, to avoid the second virtual call that would be performed by
the base class definition of the function. Because we know what
default_error_condition(int) does for the derived type, we don't need to
make a virtual call.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* src/c++11/system_error.cc (generic_error_category): Define
	class and virtual functions as 'final'.
	(generic_error_category::equivalent(int, const error_condition&)):
	Override.
	(system_error_category): Define class and virtual functions as
	'final'.
	(system_error_category::equivalent(int, const error_condition&)):
	Override.
	(generic_category_instance, system_category_instance): Use
	constinit union to make the objects immortal.
2021-09-23 16:07:38 +01:00
Jonathan Wakely
ce01e2e64c libstdc++: std::system_category should know meaning of zero [PR102425]
Although 0 is not an errno value, it should still be recognized as
corresponding to a value belonging to the generic_category().

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	PR libstdc++/102425
	* src/c++11/system_error.cc
	(system_error_category::default_error_condition): Add 0 to
	switch.
	* testsuite/19_diagnostics/error_category/102425.cc: New test.
2021-09-23 16:07:38 +01:00
GCC Administrator
0a4cb43932 Daily bump. 2021-09-18 00:16:36 +00:00
Jonathan Wakely
42eff613d0 libstdc++: Add 'noexcept' to path::iterator members
All path::iterator operations are non-throwing.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/fs_path.h (path::iterator): Add noexcept to all
	member functions and friend functions.
	(distance): Add noexcept.
	(advance): Add noexcept and inline.
	* include/experimental/bits/fs_path.h (path::iterator):
	Add noexcept to all member functions.
2021-09-17 20:43:34 +01:00
Jonathan Wakely
1fa2c5a695 libstdc++: Fix last std::tuple constructor missing 'constexpr' [PR102270]
Also rename the test so it actually runs.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	PR libstdc++/102270
	* include/std/tuple (_Tuple_impl): Add constexpr to constructor
	missed in previous patch.
	* testsuite/20_util/tuple/cons/102270.C: Moved to...
	* testsuite/20_util/tuple/cons/102270.cc: ...here.
	* testsuite/util/testsuite_allocator.h (SimpleAllocator): Add
	constexpr to constructor so it can be used for C++20 tests.
2021-09-17 20:43:34 +01:00
Jonathan Wakely
749c31b345 libstdc++: Rename tests with incorrect extension
The libstdc++ testsuite only runs .cc files, so these two old tests have
never been run.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* testsuite/26_numerics/valarray/dr630-3.C: Moved to...
	* testsuite/26_numerics/valarray/dr630-3.cc: ...here.
	* testsuite/27_io/basic_iostream/cons/16251.C: Moved to...
	* testsuite/27_io/basic_iostream/cons/16251.cc: ...here.
2021-09-17 12:40:41 +01:00
GCC Administrator
e19570d38f Daily bump. 2021-09-17 00:16:25 +00:00
Jonathan Wakely
fce4e12f8e libstdc++: Regenerate the src/debug Makefiles as needed
When the build configuration changes and Makefiles are recreated, the
src/debug/Makefile and src/debug/*/Makefile files are not recreated,
because they're not managed in the usual way by automake. This can lead
to build failures or surprising inconsistencies between the main and
debug versions of the library when doing incremental builds.

This causes them to be regenerated if any of the corresponding non-debug
makefiles is newer.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* src/Makefile.am (stamp-debug): Add all Makefiles as
	prerequisites.
	* src/Makefile.in: Regenerate.
2021-09-16 23:06:38 +01:00
Jonathan Wakely
4337893306 libstdc++: Increase timeout factor for slow pb_ds tests
Compiling these tests still times out too often when running the
testsuite with more parallel jobs than there are available cores.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* testsuite/ext/pb_ds/regression/tree_map_rand.cc: Increase
	timeout factor to 3.
	* testsuite/ext/pb_ds/regression/tree_set_rand.cc: Likewise.
2021-09-16 23:06:38 +01:00
Jonathan Wakely
bd0df30a7b libstdc++: Update documentation that only refers to c++98 and c++11
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* doc/xml/manual/using.xml: Generalize to apply to more than
	just -std=c++11.
	* doc/html/manual/using_macros.html: Regenerate.
2021-09-16 23:06:38 +01:00
Jonathan Wakely
cbe705a2f7 libstdc++: Add noexcept to std::nullopt_t constructor
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/std/optional (nullptr_t): Make constructor noexcept.
2021-09-16 23:06:38 +01:00
Jonathan Wakely
21c760510d libstdc++: Remove non-deducible parameter for std::advance overload
This was just a copy and paste error.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/fs_path.h (advance): Remove non-deducible
	template parameter.
2021-09-16 23:06:37 +01:00
Jonathan Wakely
734b2c2eed libstdc++: Add missing 'constexpr' to std::tuple [PR102270]
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	PR libstdc++/102270
	* include/std/tuple (_Head_base, _Tuple_impl): Add
	_GLIBCXX20_CONSTEXPR to allocator-extended constructors.
	(tuple<>::swap(tuple&)): Add _GLIBCXX20_CONSTEXPR.
	* testsuite/20_util/tuple/cons/102270.C: New test.
2021-09-16 23:06:31 +01:00
Jonathan Wakely
e67917f5df libstdc++: Add missing constraint to std::span deduction guide [PR102280]
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	PR libstdc++/102280
	* include/std/span (span(Range&&)): Add constraint to deduction
	guide.
2021-09-16 22:59:47 +01:00
Jonathan Wakely
2c351dafcb libstdc++: Fix recipes for C++11-compiled files in src/c++98
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* src/c++98/Makefile.am: Use CXXCOMPILE not LTCXXCOMPILE.
	* src/c++98/Makefile.in: Regenerate.
2021-09-16 22:59:47 +01:00
Jonathan Wakely
9d813ddd97 libstdc++: Add noexcept to std::to_string overloads that don't allocate
When the values is guaranteed to fit in the SSO buffer we know the
string won't allocate, so the function can be noexcept. For 32-bit
integers, we know they need no more than 9 bytes (or 10 with a minus
sign) and the SSO buffer is 15 bytes.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
	(to_string): Add noexcept if the type width is 32 bits or less.
2021-09-16 22:59:47 +01:00
Jonathan Wakely
869107c9c9 libstdc++: Add noexcept to unique_ptr accessors
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/unique_ptr.h (__uniq_ptr_impl::_M_ptr)
	(__uniq_ptr_impl::_M_deleter): Add noexcept.
2021-09-16 22:59:46 +01:00
Thomas Rodgers
f9f1a6efaa libstdc++: Fix UB in atomic_ref/wait_notify.cc [PR101761]
Remove UB in atomic_ref/wait_notify test.

Signed-off-by: Thomas Rodgers <trodgers@redhat.com>

libstdc++-v3/ChangeLog:

	PR libstdc++/101761
	* testsuite/29_atomics/atomic_ref/wait_notify.cc (test): Use
	va and vb as arguments to wait/notify, remove unused bb local.
2021-09-16 14:48:17 -07:00
GCC Administrator
9e85da8d9f Daily bump. 2021-09-16 00:16:28 +00:00
Hugo Beauzée-Luyssen
cc1e28878a libstdc++: Check for TLS support on mingw cross-compilers
Native mingw builds enable TLS, but crosses don't because we don't use
GCC_CHECK_TLS in the cross-compiler config.

libstdc++-v3/ChangeLog:

	* crossconfig.m4: Check for TLS support on mingw.
	* configure: Regenerate.
2021-09-15 09:49:33 +01:00
GCC Administrator
07985c47dc Daily bump. 2021-09-14 00:16:23 +00:00