gcc/libstdc++-v3/testsuite
Jonathan Wakely eef9bf4ca8 libstdc++: Add deprecated attributes to old iostream members
Back in 2017 I removed these prehistoric members (which were deprecated
since C++98) for C++17 mode. But I didn't add deprecated attributes to
most of them, so users didn't get any warning they would be going away.
Apparently some poor souls do actually use some of these names, and so
now that GCC 11 defaults to -std=gnu++17 some code has stopped
compiling.

This adds deprecated attributes to them, so that C++98/03/11/14 code
will get a warning if it uses them. I'll also backport this to the
release branches so that users can find out about the deprecation before
they start using C++17.

In order to give deprecated warnings even in C++98 mode this patch makes
_GLIBCXX_DEPRECATED work even for C++98, adds _GLIBCXX11_DEPRECATED for
the old meaning of _GLIBCXX_DEPRECATED, and adds new macros such as
_GLIBCXX_DEPRECATED_SUGGEST for suggesting alternatives to deprecated
features.

libstdc++-v3/ChangeLog:

	* include/bits/c++config (_GLIBCXX_DEPRECATED): Define for all
	standard modes.
	(_GLIBCXX_DEPRECATED_SUGGEST): New macro for "use 'foo' instead"
	message in deprecated warnings.
	(_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST): New
	macros for marking features derpecated in C++11.
	(_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
	New macros.
	* include/backward/auto_ptr.h (auto_ptr_ref, auto_ptr<void>):
	Use _GLIBCXX11_DEPRECATED instead of _GLIBCXX_DEPRECATED.
	(auto_ptr): Use _GLIBCXX11_DEPRECATED_SUGGEST.
	* include/backward/binders.h (binder1st, binder2nd): Likewise.
	* include/bits/ios_base.h (io_state, open_mode, seek_dir)
	(streampos, streamoff): Use _GLIBCXX_DEPRECATED_SUGGEST.
	* include/std/streambuf (stossc): Replace C++11 attribute
	with _GLIBCXX_DEPRECATED_SUGGEST.
	* include/std/type_traits (__is_nullptr_t): Use
	_GLIBCXX_DEPRECATED_SUGGEST instead of _GLIBCXX_DEPRECATED.
	* testsuite/27_io/types/1.cc: Check for deprecated warnings.
	Also check for io_state, open_mode and seek_dir typedefs.
2020-08-19 12:13:23 +01:00
..
17_intro libstdc++: Add "cold" to tests for reserved attribute names 2020-08-18 15:37:33 +01:00
18_support libstdc++: Replace some VERIFY tests with static_assert 2020-08-07 17:45:42 +01:00
19_diagnostics
20_util libstdc++: assert that type traits are not misused with incomplete types [PR 71579] 2020-08-19 12:12:40 +01:00
21_strings libstdc++: Make self-move well-defined for containers [PR 85828] 2020-08-12 20:36:00 +01:00
22_locale
23_containers libstdc++: Make self-move well-defined for containers [PR 85828] 2020-08-12 20:36:00 +01:00
24_iterators libstdc++: Implement LWG 561 for std::inserter 2020-08-10 12:09:59 +01:00
25_algorithms
26_numerics libstdc++: Avoid using __float128 in strict modes 2020-07-31 19:58:03 +01:00
27_io libstdc++: Add deprecated attributes to old iostream members 2020-08-19 12:13:23 +01:00
28_regex libstdc++: Ensure c++NN effective-target present in more tests 2020-07-31 19:58:03 +01:00
29_atomics
30_threads libstdc++: Remove redundant copying of std::async arguments [PR 69724] 2020-08-18 14:28:38 +01:00
abi
backward
config
data
decimal
experimental libstdc++: Make Networking TS work without gthreads [PR 89760] 2020-08-11 16:16:22 +01:00
ext
lib diagnostics: Add new option -fdiagnostics-plain-output 2020-08-14 09:29:19 -04:00
libstdc++-abi
libstdc++-dg
libstdc++-prettyprinters libstdc++: Remove inheritance from elements in std::tuple 2020-08-17 15:27:51 +01:00
libstdc++-xmethods
performance
special_functions
std libstdc++: Avoid using __float128 in strict modes 2020-07-31 19:58:03 +01:00
tr1 libstdc++: Ensure c++NN effective-target present in more tests 2020-07-31 19:58:03 +01:00
tr2
util
Makefile.am
Makefile.in