gcc/libstdc++-v3
Jonathan Wakely e627a941dc
libstdc++: Make _GLIBCXX_NODISCARD work for C++11 and C++14
The _GLIBCXX_NODISCARD macro only expands to [[__nodiscard__]] for C++17
and later, but all supported compilers will allow us to use that for
C++11 and C++14 too. Enable it for those older standards, to give
improved diagnostics for users of those older standards.

libstdc++-v3/ChangeLog:

	* include/bits/c++config (_GLIBCXX_NODISCARD): Expand for C++11
	and C++14.
	* testsuite/22_locale/locale/cons/12438.cc: Adjust dg-warning to
	expect nodiscard warnings for C++11 and C++14 as well.
	* testsuite/22_locale/locale/operations/2.cc: Likewise.
	* testsuite/25_algorithms/equal/debug/1_neg.cc: Likewise.
	* testsuite/25_algorithms/equal/debug/2_neg.cc: Likewise.
	* testsuite/25_algorithms/equal/debug/3_neg.cc: Likewise.
	* testsuite/25_algorithms/find_first_of/concept_check_1.cc:
	Likewise.
	* testsuite/25_algorithms/is_permutation/2.cc: Likewise.
	* testsuite/25_algorithms/lexicographical_compare/71545.cc:
	Likewise.
	* testsuite/25_algorithms/lower_bound/33613.cc: Likewise.
	* testsuite/25_algorithms/lower_bound/debug/irreflexive.cc:
	Likewise.
	* testsuite/25_algorithms/lower_bound/debug/partitioned_neg.cc:
	Likewise.
	* testsuite/25_algorithms/lower_bound/debug/partitioned_pred_neg.cc: Likewise.
	* testsuite/25_algorithms/minmax/3.cc: Likewise.
	* testsuite/25_algorithms/search/78346.cc: Likewise.
	* testsuite/25_algorithms/search_n/58358.cc: Likewise.
	* testsuite/25_algorithms/unique/1.cc: Likewise.
	* testsuite/25_algorithms/unique/11480.cc: Likewise.
	* testsuite/25_algorithms/upper_bound/33613.cc: Likewise.
	* testsuite/25_algorithms/upper_bound/debug/partitioned_neg.cc:
	Likewise.
	* testsuite/25_algorithms/upper_bound/debug/partitioned_pred_neg.cc: Likewise.
	* testsuite/27_io/ios_base/types/fmtflags/bitmask_operators.cc:
	Likewise.
	* testsuite/27_io/ios_base/types/iostate/bitmask_operators.cc:
	Likewise.
	* testsuite/27_io/ios_base/types/openmode/bitmask_operators.cc:
	Likewise.
	* testsuite/ext/concept_checks.cc: Likewise.
	* testsuite/ext/is_heap/47709.cc: Likewise.
	* testsuite/ext/is_sorted/cxx0x.cc: Likewise.
2024-11-14 17:00:40 +00:00
..
config aarch64: libstdc++: Use shufflevector instead of shuffle in opt_random.h 2024-10-24 15:01:23 +01:00
doc libstdc++: Refactor std::hash specializations 2024-11-13 20:21:41 +00:00
include libstdc++: Make _GLIBCXX_NODISCARD work for C++11 and C++14 2024-11-14 17:00:40 +00:00
libsupc++ ibstdc++: Add some further attributes to ::operator new in <new> 2024-11-08 22:07:33 +01:00
po
python libstdc++: Fix Python deprecation warning in printers.py 2024-10-16 10:09:16 +01:00
scripts libstdc++: Write timestamp to libstdc++-performance.sum file 2024-11-13 20:21:29 +00:00
src libstdc++: Enable debug assertions for filesystem directory iterators 2024-11-06 12:47:18 +00:00
testsuite libstdc++: Make _GLIBCXX_NODISCARD work for C++11 and C++14 2024-11-14 17:00:40 +00:00
.editorconfig libstdc++: Add .editorconfig files 2024-09-16 10:10:23 +01:00
acinclude.m4 libstdc++: #ifdef out #pragma GCC system_header 2024-09-25 08:20:45 -04:00
aclocal.m4
ChangeLog Daily bump. 2024-11-12 00:19:15 +00: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
ChangeLog-2018
ChangeLog-2019
ChangeLog-2020
ChangeLog-2021
ChangeLog-2022
ChangeLog-2023
config.h.in libstdc++: Fix autoconf check for O_NONBLOCK in <fcntl.h> 2024-08-28 21:34:22 +01:00
configure libstdc++: #ifdef out #pragma GCC system_header 2024-09-25 08:20:45 -04:00
configure.ac libstdc++: Fix autoconf check for O_NONBLOCK in <fcntl.h> 2024-08-28 21:34:22 +01:00
configure.host
crossconfig.m4
fragment.am
linkage.m4
Makefile.am
Makefile.in
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.