From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by sourceware.org (Postfix) with ESMTPS id 155313858C74 for ; Fri, 28 Oct 2022 17:14:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 155313858C74 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kitware.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kitware.com Received: by mail-qt1-x82b.google.com with SMTP id z6so3866550qtv.5 for ; Fri, 28 Oct 2022 10:14:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kitware.com; s=google; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=4/9QFAHuTy8RoEmZRwRZU+O+JxGZvu87XY/0P7ivxcM=; b=B0+Z1Af4UQgKMcVRkaBNZSulMCo3tGgFZBsIX5YFARK1t7dKuRCktdOhPV33QVdqxw iV2G/WbJM4CQaNZhgsS/vrZcBsvevAWgAnxKWkrQlrhc5k1Zy+ttY+xQi+2d/j+LomsO I9LVcrf1d8cYpKaInB2JlapA+5+/duwiOtBW4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4/9QFAHuTy8RoEmZRwRZU+O+JxGZvu87XY/0P7ivxcM=; b=3+DaMk21qNp6s9lQf0K0cxLqAKw+p3Hm/X9MX6hgHC79eQEwj6OfWQm7kdypGCGw8z QY1XaCld7HApwd4GaqEpXJUZ3hr7dfNnLgKrVc1ObT/VE0vkiqhAbgyg/zV99Slrnk73 I+aCQBK3pXKoJA8hiOky64pm2ngYdBnsdeQXJE0fQd5fzFvrbntS6KnY00TtaCPypfn5 aJqFFmTRnWNS2QkPnybJxtV6lgwj8k6XV6RWTEqjlpTQaAWHdaVqSyR/zOgyxAG8JdJL u4oHlYsZZG13FASyBIFMJ0jWm7/wnKq/0Vqw5dxT2e4vGav+jmyTspL68BDnANS4+Or8 /JtQ== X-Gm-Message-State: ACrzQf2bpIFLJGekB7kYsjLkfjjV+Fb9DB3ZdlSU/BRRQiy1Nsfq2pP5 aYmbqDnz7L0H/NCb0i0TSmNZfw== X-Google-Smtp-Source: AMsMyM41ZWoDkJMuojkvEAw9BRbGCB8auGlcx1WNpBycwYvhO6XakszA6LaPi4Ir4gxZCuq+NwmE2Q== X-Received: by 2002:a05:622a:410:b0:39d:8ed:33e with SMTP id n16-20020a05622a041000b0039d08ed033emr437870qtx.43.1666977291191; Fri, 28 Oct 2022 10:14:51 -0700 (PDT) Received: from localhost (cpe-142-105-146-128.nycap.res.rr.com. [142.105.146.128]) by smtp.gmail.com with ESMTPSA id v8-20020a05620a440800b006ec59941acasm3495920qkp.11.2022.10.28.10.14.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 10:14:50 -0700 (PDT) Date: Fri, 28 Oct 2022 13:14:48 -0400 From: Ben Boeckel To: David Malcolm Cc: gcc-patches@gcc.gnu.org, jason@redhat.com, nathan@acm.org, fortran@gcc.gnu.org, gcc@gcc.gnu.org, brad.king@kitware.com, mliska@suse.cz, anlauf@gmx.de Subject: Re: [PATCH v2 2/3] libcpp: add a function to determine UTF-8 validity of a C string Message-ID: References: <20221027231645.67623-1-ben.boeckel@kitware.com> <20221027231645.67623-3-ben.boeckel@kitware.com> <66cdd46f6951420cbbee34117ec8870e3ce3e658.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <66cdd46f6951420cbbee34117ec8870e3ce3e658.camel@redhat.com> User-Agent: Mutt/2.2.7 (2022-08-07) X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: On Fri, Oct 28, 2022 at 08:59:16 -0400, David Malcolm wrote: > On Thu, 2022-10-27 at 19:16 -0400, Ben Boeckel wrote: > > This simplifies the interface for other UTF-8 validity detections > > when a > > simple "yes" or "no" answer is sufficient. > > > > Signed-off-by: Ben Boeckel > > --- > >  libcpp/ChangeLog  |  6 ++++++ > >  libcpp/charset.cc | 18 ++++++++++++++++++ > >  libcpp/internal.h |  2 ++ > >  3 files changed, 26 insertions(+) > > > > diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog > > index 4d707277531..4e2c7900ae2 100644 > > --- a/libcpp/ChangeLog > > +++ b/libcpp/ChangeLog > > @@ -1,3 +1,9 @@ > > +2022-10-27  Ben Boeckel  > > + > > +       * include/charset.cc: Add `_cpp_valid_utf8_str` which > > determines > > +       whether a C string is valid UTF-8 or not. > > +       * include/internal.h: Add prototype for > > `_cpp_valid_utf8_str`. > > + > >  2022-10-27  Ben Boeckel  > >   > >         * include/charset.cc: Reject encodings of codepoints above > > 0x10FFFF. > > The patch looks good to me, with the same potential caveat that you > might need to move the ChangeLog entry from the patch "body" to the > leading blurb, to satisfy: > ./contrib/gcc-changelog/git_check_commit.py Ah, I had missed that. Now fixed locally for patches 1 and 2; will be in v3 pending some time for further reviews. THanks, --Ben