public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-5726] testsuite: Expect -Wdeprecated warning in warn/Wstrict-aliasing-bogus-union-2.C for C++23
Date: Tue,  7 Feb 2023 09:24:47 +0000 (GMT)	[thread overview]
Message-ID: <20230207092447.7F1FC3858D33@sourceware.org> (raw)

https://gcc.gnu.org/g:64b5ca4345f6a96a8b85b8aa1cfcc9cf667eadfd

commit r13-5726-g64b5ca4345f6a96a8b85b8aa1cfcc9cf667eadfd
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Feb 7 10:23:13 2023 +0100

    testsuite: Expect -Wdeprecated warning in warn/Wstrict-aliasing-bogus-union-2.C for C++23
    
    On Mon, Feb 06, 2023 at 02:26:01PM +0000, Jonathan Wakely via Gcc-patches wrote:
    > With the recent change to deprecate std::aligned_storage and
    > std::aligned_union we need to adjust some tests that now fail with
    > -std=c++23.
    
    The g++.dg/warn/Wstrict-aliasing-bogus-union-2.C test is also affected:
    PASS: g++.dg/warn/Wstrict-aliasing-bogus-union-2.C  -std=gnu++2b  (test for bogus messages, line 12)
    FAIL: g++.dg/warn/Wstrict-aliasing-bogus-union-2.C  -std=gnu++2b (test for excess errors)
    Excess errors:
    .../gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-union-2.C:8:8: warning: 'template<long unsigned int _Len, long unsigned int _Align> struct std::aligned_storage' is deprecated [-
    
    The following patch adds dg-warning for it.
    
    2023-02-07  Jakub Jelinek  <jakub@redhat.com>
    
            * g++.dg/warn/Wstrict-aliasing-bogus-union-2.C: Expect
            -Wdeprecated warning for C++23.

Diff:
---
 gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-union-2.C | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-union-2.C b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-union-2.C
index 2b4895aea97..e0a27e82b75 100644
--- a/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-union-2.C
+++ b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-union-2.C
@@ -5,7 +5,7 @@
 
 struct foo
 {
-  std::aligned_storage<sizeof(long), alignof(long)>::type raw;
+  std::aligned_storage<sizeof(long), alignof(long)>::type raw;	/* { dg-warning "deprecated" "" { target c++23 } } */
 
   long& cooked()
     {

                 reply	other threads:[~2023-02-07  9:24 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=20230207092447.7F1FC3858D33@sourceware.org \
    --to=jakub@gcc.gnu.org \
    --cc=gcc-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).