From patchwork Fri Nov 4 09:14:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1699410 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=djIxi14L; 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 4N3Zhy6zmtz1yqS for ; Fri, 4 Nov 2022 20:15:14 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E8AC43858282 for ; Fri, 4 Nov 2022 09:15:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E8AC43858282 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667553312; bh=KNH4gqr+hZM6RnQkgt/jRPOy6oXbRVjFSPeMfanpv5k=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=djIxi14LRZCzSSZdy74y1QqzBzslD02DoE/WAbXeKoQeovh0sc3gKXSiaOdMuxoLM HR3MoFllVYGV5CRoSc8F97q1I/VPTR3dXQndlirC7IZ9XyeV8VEzFNHr/ntnX/iDIS DNoOlVZkC2QNHttYy/2vTCEdbcA46ZxM/7jk1moU= 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.133.124]) by sourceware.org (Postfix) with ESMTPS id 615BC3858403 for ; Fri, 4 Nov 2022 09:14:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 615BC3858403 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-56-OQ7gruUXNuC0ITM2AZ5qUQ-1; Fri, 04 Nov 2022 05:14:38 -0400 X-MC-Unique: OQ7gruUXNuC0ITM2AZ5qUQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 71F623814953 for ; Fri, 4 Nov 2022 09:14:38 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.193.252]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2EE3D40C6EE9; Fri, 4 Nov 2022 09:14:38 +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 2A49EZL02675210 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 4 Nov 2022 10:14:36 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 2A49EZUu2675209; Fri, 4 Nov 2022 10:14:35 +0100 Date: Fri, 4 Nov 2022 10:14:35 +0100 To: Jason Merrill Subject: [PATCH] testsuite: Add testcase from C++23 P2314R4 - Character sets and encodings Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham 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 Cc: gcc-patches@gcc.gnu.org Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi! I've read the paper and I believe we just implement it with no changes needed (at least since PR67224 and similar libcpp changes in GCC 10), but I could be wrong. The following patch at least adds a testcase from the start of the paper. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? Do you agree that we can mark the paper as implemented or do you think we need to change something (what?)? 2022-11-04 Jakub Jelinek * g++.dg/cpp23/charset1.C: New testcase from C++23 P2314R4. Jakub --- gcc/testsuite/g++.dg/cpp23/charset1.C.jj 2022-11-03 10:56:48.114588796 +0100 +++ gcc/testsuite/g++.dg/cpp23/charset1.C 2022-11-03 10:56:39.162711201 +0100 @@ -0,0 +1,10 @@ +// P2314R4 +// { dg-do compile { target c++23 } } +// { dg-options "-finput-charset=UTF-8 -fexec-charset=UTF-8" } + +#define S(x) # x +const char s1[] = S(Köppe); // "Köppe" +const char s2[] = S(K\u00f6ppe); // "Köppe" + +static_assert (sizeof (s1) == 7); +static_assert (sizeof (s2) == 7);