From patchwork Tue Feb 7 09:25:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1738804 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=rZCPdaL/; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P9yR413Mnz23jB for ; Tue, 7 Feb 2023 20:25:35 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DD329385840A for ; Tue, 7 Feb 2023 09:25:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD329385840A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675761926; bh=mZxyXWWvOKUCYXx+eULt1uS3fBM1dze/T1JyF4VhaRk=; h=Date:To:Cc:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=rZCPdaL/CVFO2VMDY1bPUcQjGPxNDNW0B6XtMrnLJKHPQOEzuSbiYwK2tL+a/3eFm MiCA1cIoVZ+yZ1kjSi/jISN4U6LkSdvxt2ijmr4Dk2KlN33KRlL9B4OhclqEZYi7tX w6gtGgKCW5uX6YKGK+vFJgMJQxIn/9j0g3tegMhg= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 3D3D83858D33 for ; Tue, 7 Feb 2023 09:25:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3D3D83858D33 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-241-AQvBJJL-MuqyhHfcsLdNow-1; Tue, 07 Feb 2023 04:25:04 -0500 X-MC-Unique: AQvBJJL-MuqyhHfcsLdNow-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3F2932800484 for ; Tue, 7 Feb 2023 09:25:04 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.223]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F059E440DE; Tue, 7 Feb 2023 09:25:03 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 3179P1x3979388 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 7 Feb 2023 10:25:02 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3179P18M979387; Tue, 7 Feb 2023 10:25:01 +0100 Date: Tue, 7 Feb 2023 10:25:00 +0100 To: Jonathan Wakely , Jason Merrill Cc: gcc-patches@gcc.gnu.org Subject: [committed] testsuite: Expect -Wdeprecated warning in warn/Wstrict-aliasing-bogus-union-2.C for C++23 Message-ID: References: <20230206142601.2970070-1-jwakely@redhat.com> MIME-Version: 1.0 In-Reply-To: <20230206142601.2970070-1-jwakely@redhat.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi! 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 struct std::aligned_storage' is deprecated [-Wdeprecated-declarations] The following patch adds dg-warning for it. Tested on x86_64-linux -m32/-m64 with GXX_TESTSUITE_STDS=98,11,14,17,20,2b , committed to trunk as obvious. 2023-02-07 Jakub Jelinek * g++.dg/warn/Wstrict-aliasing-bogus-union-2.C: Expect -Wdeprecated warning for C++23. Jakub --- gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-union-2.C.jj 2020-01-12 11:54:37.286400238 +0100 +++ gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-union-2.C 2023-02-07 10:21:47.616642483 +0100 @@ -5,7 +5,7 @@ struct foo { - std::aligned_storage::type raw; + std::aligned_storage::type raw; /* { dg-warning "deprecated" "" { target c++23 } } */ long& cooked() {