gcc/libstdc++-v3
Jonathan Wakely ff27340046 Don't unconditionally define feature test macros in <version>
The macro definitions in <version> should depend on the same
preprocessor conditions as the original macros in other headers.
Otherwise <version> can define macros that imply the availability of
features that are not actually defined.

This fix is incomplete, as __cpp_lib_filesystem should depend on whether
libstdc++fs.a is supported, and several macros should only be defined
when _GLIBCXX_HOSTED is defined. Also, the feature test macros should
define their value as type long, but most are type int.

	* include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP)
	(_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Move definitions here.
	(_GLIBCXX_HAVE_BUILTIN_LAUNDER): Likewise. Use !__is_identifier
	instead of __has_builtin.
	* include/std/type_traits (_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP)
	(_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Remove definitions from here.
	* include/std/version [!_GLIBCXX_HAS_GTHREADS]
	(__cpp_lib_shared_timed_mutex, __cpp_lib_scoped_lock)
	(__cpp_lib_shared_mutex): Don't define when Gthreads not in use.
	[!_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP]
	(__cpp_lib_has_unique_object_representations): Don't define when
	builtin not available.
	[!_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE] (__cpp_lib_is_aggregate):
	Likewise.
	[!_GLIBCXX_HAVE_BUILTIN_LAUNDER] (__cpp_lib_launder): Likewise.
	* libsupc++/new (_GLIBCXX_HAVE_BUILTIN_LAUNDER): Remove definition
	from here.

From-SVN: r263184
2018-07-31 23:31:14 +01:00
..
config Add initial version of C++17 <memory_resource> header 2018-07-24 22:09:55 +01:00
doc Improve libstdc++ docs w.r.t newer C++ standards 2018-07-31 16:02:32 +01:00
include Don't unconditionally define feature test macros in <version> 2018-07-31 23:31:14 +01:00
libsupc++ Don't unconditionally define feature test macros in <version> 2018-07-31 23:31:14 +01:00
po PR libstdc++/86450 use -Wabi=2 and simplify -Werror use 2018-07-17 14:18:47 +01:00
python PR libstdc++/86450 use -Wabi=2 and simplify -Werror use 2018-07-17 14:18:47 +01:00
scripts * scripts/create_testsuite_files: Fix typo in comment. 2018-07-16 18:42:20 +01:00
src * src/c++98/locale_init.cc: Fix #ifdef condition. 2018-07-26 16:36:50 +00:00
testsuite PR libstdc++/86734 make reverse_iterator::operator-> more robust 2018-07-30 18:13:05 +01:00
acinclude.m4 Add new src/c++17 directory to list in acinclude.m4 2018-07-25 12:01:39 +01:00
aclocal.m4
ChangeLog Don't unconditionally define feature test macros in <version> 2018-07-31 23:31:14 +01:00
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017 Update copyright years. 2018-01-03 11:03:58 +01:00
config.h.in Fix bootstrap failure for bare metal due to autoconf link tests 2018-06-18 17:01:24 +01:00
configure Add initial version of C++17 <memory_resource> header 2018-07-24 22:09:55 +01:00
configure.ac PR libstdc++/86450 use -Wabi=2 and simplify -Werror use 2018-07-17 14:18:47 +01:00
configure.host
crossconfig.m4 crossconfig.m4: Handle OpenBSD just like NetBSD. 2018-06-18 11:28:53 -06:00
fragment.am PR libstdc++/86450 use -Wabi=2 and simplify -Werror use 2018-07-17 14:18:47 +01:00
linkage.m4
Makefile.am Update copyright years. 2018-01-03 11:03:58 +01:00
Makefile.in PR libstdc++/86450 use -Wabi=2 and simplify -Werror use 2018-07-17 14:18:47 +01:00
README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.