This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PR libstdc++/83598 don't modify flags passed to std::basic_regex constructors


The standard requires that std::regex("", f).flags() == f so we
shouldn't modify the flags passed to the constructor. We can just
remove the code that does so, because the _Compiler class repeats the
code to conditionally set ECMAScript in the flags anyway, so there's
no need to do so for the value stored in the basic_regex::_M_flags
member.

	PR libstdc++/83598
	* include/bits/regex.h (basic_regex): Don't modify flags passed to
	constructors.
	* testsuite/28_regex/basic_regex/ctors/83598.cc: New test.

Tested powerpc64le-linux, committed to trunk. Backports to follow.

Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]