Go to file
Jonathan Wakely b376b1ef38 libstdc++: Simplify constexpr checks in std::char_traits [PR 91488]
This removes the helper functions added by r8-1294 to detect whether the
char_traits member functions can be evaluated at compile time. Instead,
we can just use __builtin_constant_evaluated directly, which is well
supported by non-GCC compilers by now.

As a result, there is a chance that those members will no longer be
usable in constant expressions when using old versions of non-GCC
compilers. Make the relevant feature test macros depend on the
availability of __builtin_constant_evaluated, so they are defined only
when the feature is actualyl available.

The new testcase from the PR is added to the libitm testsuite, because
that's where we can be sure it's OK to use the -fgnu-tm option.

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

	PR libstdc++/91488

libstdc++-v3/ChangeLog:

	* include/bits/basic_string.h (__cpp_lib_constexpr_string): Only
	define when is_constant_evaluated is available.
	* include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
	Likewise.
	(__constant_string_p, __constant_array_p): Remove.
	(char_traits): Use is_constant_evaluated directly.
	* include/std/version (__cpp_lib_constexpr_char_traits)
	(__cpp_lib_constexpr_string): Only define when
	is_constant_evaluated is available.

libitm/ChangeLog:

	* testsuite/libitm.c++/libstdc++-pr91488.C: New test.
2021-06-17 22:00:58 +01:00
c++tools
config Daily bump. 2021-06-15 00:16:37 +00:00
contrib mklog: add subject line skeleton 2021-06-17 13:15:57 -04:00
fixincludes
gcc c++: deleted after first declaration [PR101106] 2021-06-17 15:48:07 -04:00
gnattools
gotools
include
INSTALL
intl Daily bump. 2021-06-15 00:16:37 +00:00
libada
libatomic
libbacktrace
libcc1
libcody
libcpp Daily bump. 2021-06-17 00:16:54 +00:00
libdecnumber
libffi Daily bump. 2021-06-17 00:16:54 +00:00
libgcc Daily bump. 2021-06-12 00:16:27 +00:00
libgfortran Daily bump. 2021-06-09 00:16:30 +00:00
libgo libgo: update to Go1.16.5 release 2021-06-10 14:41:23 -07:00
libgomp libgomp: Structure element mapping for OpenMP 5.0 2021-06-17 21:34:59 +08:00
libiberty
libitm libstdc++: Simplify constexpr checks in std::char_traits [PR 91488] 2021-06-17 22:00:58 +01:00
libobjc
liboffloadmic
libphobos Daily bump. 2021-06-12 00:16:27 +00:00
libquadmath Daily bump. 2021-06-09 00:16:30 +00:00
libsanitizer
libssp
libstdc++-v3 libstdc++: Simplify constexpr checks in std::char_traits [PR 91488] 2021-06-17 22:00:58 +01:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS Add amacleod and aldyh as *vrp and ranger maintainers. 2021-06-17 09:49:43 +02:00
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.