public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: William Schmidt <wschmidt@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc(refs/users/wschmidt/heads/builtins3)] libstdc++: Add -Wno-deprecated for tests that warn in C++20
Date: Tue, 18 Aug 2020 18:19:38 +0000 (GMT)	[thread overview]
Message-ID: <20200818181938.259FD393BC17@sourceware.org> (raw)

https://gcc.gnu.org/g:95edead9aab7a70636f87ea041f05469dc41d9a9

commit 95edead9aab7a70636f87ea041f05469dc41d9a9
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Jul 31 17:51:00 2020 +0100

    libstdc++: Add -Wno-deprecated for tests that warn in C++20
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/20_util/tuple/78939.cc: Suppress warnings about
            deprecation of volatile-qualified structured bindings in C++20.
            * testsuite/20_util/variable_templates_for_traits.cc: Likewise
            for deprecation of is_pod in C++20

Diff:
---
 libstdc++-v3/testsuite/20_util/tuple/78939.cc                   | 5 +++--
 libstdc++-v3/testsuite/20_util/variable_templates_for_traits.cc | 4 +++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/libstdc++-v3/testsuite/20_util/tuple/78939.cc b/libstdc++-v3/testsuite/20_util/tuple/78939.cc
index d238f75bb8a..b2ff324b232 100644
--- a/libstdc++-v3/testsuite/20_util/tuple/78939.cc
+++ b/libstdc++-v3/testsuite/20_util/tuple/78939.cc
@@ -16,6 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++17" }
+// { dg-additional-options "-Wno-deprecated" { target c++2a } }
 // { dg-do compile { target c++17 } }
 
 // PR libstdc++/78939
@@ -36,7 +37,7 @@ int
 test02()
 {
   A a{};
-  volatile auto [i, j] = a;
+  volatile auto [i, j] = a; // deprecated in C++20
   return i + j;
 }
 
@@ -44,6 +45,6 @@ int
 test03()
 {
   A a{};
-  const volatile auto [i, j] = a;
+  const volatile auto [i, j] = a; // deprecated in C++20
   return i + j;
 }
diff --git a/libstdc++-v3/testsuite/20_util/variable_templates_for_traits.cc b/libstdc++-v3/testsuite/20_util/variable_templates_for_traits.cc
index 0f1625a8cb6..9c1f82b5c86 100644
--- a/libstdc++-v3/testsuite/20_util/variable_templates_for_traits.cc
+++ b/libstdc++-v3/testsuite/20_util/variable_templates_for_traits.cc
@@ -1,5 +1,6 @@
 // { dg-options "-std=gnu++17" }
-// { dg-do compile }
+// { dg-additional-options "-Wno-deprecated" { target c++2a } }
+// { dg-do compile { target c++17 } }
 
 // Copyright (C) 2014-2020 Free Software Foundation, Inc.
 //
@@ -142,6 +143,7 @@ static_assert(is_standard_layout_v<int>
 static_assert(!is_standard_layout_v<NType>
 	      && !is_standard_layout<NType>::value, "");
 
+// Deprecated in C++20
 static_assert(is_pod_v<int>
 	      && is_pod<int>::value, "");
 static_assert(!is_pod_v<NType>


                 reply	other threads:[~2020-08-18 18:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200818181938.259FD393BC17@sourceware.org \
    --to=wschmidt@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).