gcc/libstdc++-v3/testsuite
Marek Polacek bee2f80b90 c++: Reject ordered comparison of null pointers [PR99701]
When implementing DR 1512 in r11-467 I neglected to reject ordered
comparison of two null pointers, like nullptr < nullptr.  This patch
fixes that omission.

	DR 1512
	PR c++/99701

gcc/cp/ChangeLog:

	* cp-gimplify.c (cp_fold): Remove {LE,LT,GE,GT_EXPR} from
	a switch.
	* typeck.c (cp_build_binary_op): Reject ordered comparison
	of two null pointers.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/nullptr11.C: Remove invalid tests.
	* g++.dg/cpp0x/nullptr46.C: Add dg-error.
	* g++.dg/cpp2a/spaceship-err7.C: New test.
	* g++.dg/expr/ptr-comp4.C: New test.

libstdc++-v3/ChangeLog:

	* testsuite/20_util/tuple/comparison_operators/overloaded.cc:
	Move a line...
	* testsuite/20_util/tuple/comparison_operators/overloaded2.cc:
	...here.  New test.
2021-07-27 11:38:59 -04:00
..
17_intro libstdc++: Fix backwards logic in 17_intro/names.cc test [PR 97088] 2021-06-28 15:15:16 +01:00
18_support libstdc++: Implement LWG 3465 for std::compare_partial_order_fallback [PR101056] 2021-06-14 14:04:45 +01:00
19_diagnostics libstdc++: Remove redundant -std=gnu++17 option from remaining tests 2021-05-10 16:22:54 +01:00
20_util c++: Reject ordered comparison of null pointers [PR99701] 2021-07-27 11:38:59 -04:00
21_strings libstdc++: Add noexcept-specifier to basic_string_view(It, End) 2021-07-14 12:23:33 +01:00
22_locale libstdc++: Fix new test for C++98 mode [PR 89728] 2021-06-01 19:02:42 +01:00
23_containers libstdc++: Remove unnecessary uses of <utility> 2021-07-27 12:04:18 +01:00
24_iterators libstdc++: Implement P2325 changes to default-constructibility of views 2021-06-17 22:29:03 -04:00
25_algorithms libstdc++: Reduce ranges::minmax/minmax_element comparison complexity 2021-06-18 19:33:39 -04:00
26_numerics libstdc++: Modernize <bits/random.h> helpers 2021-07-16 15:03:03 +01:00
27_io libstdc++: Fix create_directories to resolve symlinks [PR101510] 2021-07-20 20:34:47 +01:00
28_regex libstdc++: Remove redundant -std=gnu++17 option from remaining tests 2021-05-10 16:22:54 +01:00
29_atomics libstd++: Only support atomic_ref::wait tests which are always lockfree 2021-06-09 13:46:03 -07:00
30_threads libstdc++: Avoid "__lockable" name defined as macro by newlib 2021-06-23 11:05:51 +01:00
abi
backward
config
data
decimal
experimental libstdc++: Fix create_directories to resolve symlinks [PR101510] 2021-07-20 20:34:47 +01:00
ext libstdc++: Make __gnu_cxx::sequence_buffer move-aware [PR101542] 2021-07-21 17:20:37 +01:00
lib Add 'dg-note', 'dg-lto-note' 2021-05-18 12:39:57 +02:00
libstdc++-abi
libstdc++-dg
libstdc++-prettyprinters libstdc++: Remove redundant -std=gnu++17 option from remaining tests 2021-05-10 16:22:54 +01:00
libstdc++-xmethods
performance
special_functions
std libstdc++: Reduce header dependencies on <array> and <utility> 2021-07-27 12:04:18 +01:00
tr1 libstdc++: Fix some tests that fail in C++20 mode 2021-04-12 12:30:07 +01:00
tr2
util libstdc++: Use std::addressof in ranges::uninitialized_xxx [PR101571] 2021-07-22 14:37:24 +01:00
Makefile.am libstdc++: Remove -fno-tree-vrp after PR98834 was resolved 2021-06-23 18:28:59 +01:00
Makefile.in libstdc++: Remove -fno-tree-vrp after PR98834 was resolved 2021-06-23 18:28:59 +01:00