From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by sourceware.org (Postfix) with ESMTPS id C2DD0383FB84 for ; Thu, 20 Oct 2022 17:31:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C2DD0383FB84 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-x830.google.com with SMTP id w3so37835qtv.9 for ; Thu, 20 Oct 2022 10:31:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kitware.com; s=google; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=SrWne2hqNSTL0lDOBc3jDkFENmTjO7HJAVLickgqm3w=; b=JAOa4U7YskJJtEO4jYNHwrBRCeRkmjqxOoYXM8nNzX1gcnarFhzXuF5Uu3TfbGpxXN s9ZEZ3TnVJ4KOSUGprSbfyZGNcwccKN8ZTTS2E4no6QHW6AIgKzUysKbcrFZpIONYi7P NgN5HSYhe4911ZmA/fF7rDNRv0QyO44CykEAg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to: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=SrWne2hqNSTL0lDOBc3jDkFENmTjO7HJAVLickgqm3w=; b=KSylpB9327FBhttpMt8bXrWwKRIPcRMzCYMYoLYObSP5MUVIICj+WuojySZ7IrHdM9 6uEq6UAbCNlAYpqSkC8wr57qjqsCbirHyJBaPY+Sm35wafbyk6KpMrrP0b/6spKGTf8U 5pboIVDxA+Yy771RGhtO/Ce5lrwB8PMbHD+5cP8jd+37xFr2AOQR4yOh64+t0TEa5De3 nBJmpe6hHyocp0XOHJ+JCufIQGIAJ/d4yRxsRnZMyoke9AhCnMpyzcR22e4fZqyaZqwv 7r5CldwWqBlakZVkF/qFJYHnoN7bNHh4Zl+9nucd5xDU6qg5tSDnOaRz5x20gmJUC8Wm OvHQ== X-Gm-Message-State: ACrzQf3iiQOawRqrLPQE9ZksuS7zQstNdNAXX8cbRZ5kBtjspled9L0q BDjX3698e6D4TWXl3zGGNg4qOg== X-Google-Smtp-Source: AMsMyM4ml+0SGL/GOywTcXxNLmz7KquF1BDFmMjDliIjZPt59xyiBH8hy3NTek7hlApRXMyBc5Y0Lg== X-Received: by 2002:a05:622a:164b:b0:39c:ec98:a13 with SMTP id y11-20020a05622a164b00b0039cec980a13mr12299258qtj.339.1666287105092; Thu, 20 Oct 2022 10:31:45 -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 bm34-20020a05620a19a200b006ce1bfbd603sm7477965qkb.124.2022.10.20.10.31.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 10:31:44 -0700 (PDT) Date: Thu, 20 Oct 2022 13:31:43 -0400 From: Ben Boeckel To: Jason Merrill Cc: Ben Boeckel , gcc-patches@gcc.gnu.org, nathan@acm.org, fortran@gcc.gnu.org, gcc@gcc.gnu.org, brad.king@kitware.com Subject: Re: [PATCH RESEND 1/1] p1689r5: initial support Message-ID: References: <20221004151200.1275636-1-ben.boeckel@kitware.com> <20221004151200.1275636-2-ben.boeckel@kitware.com> <78b88b1d-b328-a140-3a27-d33a3d96f3b9@redhat.com> <49eb01df-8da3-c5fb-f2c2-864c6c7dc227@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <49eb01df-8da3-c5fb-f2c2-864c6c7dc227@redhat.com> User-Agent: Mutt/2.2.7 (2022-08-07) X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Thu, Oct 20, 2022 at 11:39:25 -0400, Jason Merrill wrote: > Oops, I was thinking this was in gcc as well. In libcpp there's > _cpp_valid_utf8 (which calls one_utf8_to_cppchar). This routine has a lot more logic (including UCN decoding) and the `one_utf8_to_cppchar` also supports out-of-bounds codepoints above `0x10FFFF`. --Ben