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.129.124]) by sourceware.org (Postfix) with ESMTPS id 7595D3858D32 for ; Mon, 5 Sep 2022 08:16:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7595D3858D32 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=1662365812; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-to:resent-from:resent-message-id: in-reply-to:in-reply-to:references:references; bh=WxZ9uaOQUU9uyUK1PUSaGAfHVrABtD7OxLa8ysXsXrU=; b=LPt3pXnnNoJHtCACe0pvp9EcBNLYjSIedBmoVGakwv4QsMS50VVNLZeWduSIE6qqS9r3ws 6+4IYODSwVayYKt/W0b7CVK9GY93vD/W0wtvYkvsVM88dyuIvQ6iYRPnTTzRY5WaiF17UM N8eia/4BZpLSdSPjG4LJtcgyZ3PPA2M= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-637-lFbkU5hqNq25s227le25jw-1; Mon, 05 Sep 2022 04:16:50 -0400 X-MC-Unique: lFbkU5hqNq25s227le25jw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DF528101A56C; Mon, 5 Sep 2022 08:16:49 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6C2E914582E0; Mon, 5 Sep 2022 08:16:49 +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 2858GkZ62458217 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 5 Sep 2022 10:16:46 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 2858Gja12458216; Mon, 5 Sep 2022 10:16:45 +0200 Resent-From: Jakub Jelinek Resent-Date: Mon, 5 Sep 2022 10:16:45 +0200 Resent-Message-ID: Resent-To: Jason Merrill , Joseph Myers , gcc-patches@gcc.gnu.org Date: Mon, 5 Sep 2022 09:54:04 +0200 From: Jakub Jelinek To: Jason Merrill , Joseph Myers , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] libcpp, v3: Named universal character escapes and delimited escape sequence tweaks Message-ID: Reply-To: Jakub Jelinek References: <5da578e7-9c43-99ea-15c1-aefc641a0654@redhat.com> <37250e6c-80f9-2b93-a381-c1c9b869c04d@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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: On Sat, Sep 03, 2022 at 12:54:31PM +0200, Jakub Jelinek via Gcc-patches wrote: > On Sat, Sep 03, 2022 at 12:29:52PM +0200, Jakub Jelinek wrote: > > On Thu, Sep 01, 2022 at 03:00:28PM -0400, Jason Merrill wrote: > > > We might as well use the same flag name, and document it to mean what it > > > currently means for GCC. > > > > Ok, following patch introduces -Wunicode (on by default). > > > > > It looks like this is handling \N{abc}, for which "incomplete" seems like > > > the wrong description; it's complete, just wrong, and the diagnostic doesn't > > > help correct it. > > > > And also will emit the is not a valid universal character with did you mean > > if it matches loosely, otherwise will use the not terminated with } after > > ... wording. > > > > Ok if it passes bootstrap/regtest? > > Actually, treating the !strict case like the strict case except for always > warning instead of error if outside of literals is simpler. > > The following version does that. The only difference on the testcases is in > the > int f = a\N{abc}); > cases where it emits different diagnostics. And this version passed successfully bootstrap/regtest. Jakub