From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667553280; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KNH4gqr+hZM6RnQkgt/jRPOy6oXbRVjFSPeMfanpv5k=; b=f6Zl2dh4YZKUZ1enUF05IKyTH1zWabN1yOJ56zkRz/Wz8XSzJ4ARZbRmVFlqLKAGgO5wsm eAs94a/LVxv/gf6vWZn3YQAZ7ykq+4vLacj4w6pG5W07bt/mW6qzU99EpXzTFKoYkiBoJ4 TU9RBpdxyfdSZrC7StnAzoUndMBUyQQ= 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 From: Jakub Jelinek To: Jason Merrill Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] testsuite: Add testcase from C++23 P2314R4 - Character sets and encodings Message-ID: Reply-To: Jakub Jelinek 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-Type: text/plain; charset=WINDOWS-1252 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 List-Id: 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. --- 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); Jakub