I'm not sure why I didn't check this in along with adding -std=c++20, since
I wrote this patch at the same time.  The testsuite should support both
{ target c++2a } and { target c++20 }.

Tested x86_64-pc-linux-gnu, applying to trunk and 10.

gcc/testsuite/ChangeLog
2020-05-13  Jason Merrill  <ja...@redhat.com>

        * lib/target-supports.exp (check_effective_target_c++20_only)
        (check_effective_target_c++20): New.
---
 gcc/testsuite/lib/target-supports.exp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gcc/testsuite/lib/target-supports.exp 
b/gcc/testsuite/lib/target-supports.exp
index 3a6ab8740c3..88f4a9cd812 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -9134,6 +9134,14 @@ proc check_effective_target_c++2a { } {
     return [check_effective_target_c++2a_only]
 }
 
+proc check_effective_target_c++20_only { } {
+    return [check_effective_target_c++2a_only]
+}
+
+proc check_effective_target_c++20 { } {
+    return [check_effective_target_c++2a]
+}
+
 # Check for C++ Concepts support, i.e. -fconcepts flag.
 proc check_effective_target_concepts { } {
     if [check_effective_target_c++2a] {

base-commit: 18edc195442291525e04f0fa4d5ef972155117da
-- 
2.18.1

Reply via email to