From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id 47E383857C50; Thu, 4 Jan 2024 15:23:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 47E383857C50 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 47E383857C50 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::331 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704381788; cv=none; b=Rj4BqZofaa/URf4uxE/wpKaZC0PPgpcLY1P3KA3hnNXwU6MB0oTamkPbCoo8cY/bykpBJzoLplfHxsQcMUYcFiTLlY54NOpRlXN1pzE7ly/jNMBBXDwK2G8ACHZstqObNr9fcNE+y1ayz3cde7lQ9glxpKuK1L0HD5nt6W95x88= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704381788; c=relaxed/simple; bh=aT7ChHLYOBHdKNR1qi9NNh2Ns0KWjnkGY5bEPg9lzAc=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=D8VysVVnIVJNnnL3FNq282kIyYtaMpcFGxiKILog96iCc+zcGOeSZud8BhRj+CCmSGFxPm2XDYI/QzsgOrrPqBami+fwR+F6eYfofLvegjpHUkOro3SMkFcSSTuRQ/paq8qZI4kJNMJAcQOMi6ajtXylCvjxfDxnjXclgjKi6mw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40d5d8a6730so5240915e9.1; Thu, 04 Jan 2024 07:23:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704381785; x=1704986585; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=yMqolEZLsZrY+FyCFYPKV6cJTxxqUanUYfrZozCnS70=; b=KzGzziVzwTVEp74grnhUKynLmuk+tTgb1hbOJX4roOvqsLFroMVuloNT7yj79mCC47 6O1Eyg/uY6T1sq7WXS+K+1tNzp+8/g8NaaZZtLSiY8MktEUs9nwz7EzQrU9bv0vJtv7m el6vUxAjEQZYuo1ln1bbgjTLxNVElVosQJaYmMVwaSqYZJwt3DXBu7Os3jMY9jfZXmvh WWx77Gafn5yPnqVKvz5h6MoYs3kGIOznMJh0BKiQcQuaoWn1G3gfk9lkSHi1T227H1YG YhslkFW0RETHd46jZzPHbmU+WIJ2DP2xvZcKFzOyGXF1gU8r2lNLaMAUO+OmdEyYOypV xy3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704381785; x=1704986585; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yMqolEZLsZrY+FyCFYPKV6cJTxxqUanUYfrZozCnS70=; b=BQ4yJ3keihKvkYHdRgjwZWW3s4ACFW9Z5Le4iqB0EHdrMa5FEXh6SwbLAmSKqWgDC/ beO2LwiwHiIfEynS4bR/svWYhQn4eiT4uKJI3ygXKiGPAi/4rWC8sePn7dxS6A7GljE8 CNMdtB2R15aLFznFvRVrTrzNqbxD9M8a7VuxjrCNEjt2W32/2mjjsrAZMxFj/VoNRzbT FWWWM2o1rvPxSaChEeSZh/bdDzFjinFojPJVdlAGuMIFa3Q8gnssLAqWory7ZP1VvrQ/ /A1u30PKQc2/aAclEzwRMt/hrG0sxB53+vloWhBeDzcn1n5SXdXmAeqoeQLmb5Grb1d8 Jwxg== X-Gm-Message-State: AOJu0YxZAhVXERYfXZwBxRP6z07mNLPpH225PUhnioQIUcmEzNi2BWJM WPN00SobT3iyNx+DeKayqw== X-Google-Smtp-Source: AGHT+IHJ4ujXERXN4x4f/1YExZCAuv5Vz6k7y/UbWwAdgfN+9yo1LZXK4LRvKojhi1vYpkaPYNoV8g== X-Received: by 2002:a05:600c:4f94:b0:40d:70c3:5f3d with SMTP id n20-20020a05600c4f9400b0040d70c35f3dmr450584wmq.105.1704381784764; Thu, 04 Jan 2024 07:23:04 -0800 (PST) Received: from [192.168.13.237] ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id e16-20020a05600c4e5000b0040d933ad598sm3953433wmq.27.2024.01.04.07.23.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Jan 2024 07:23:04 -0800 (PST) Message-ID: <74dd60d8-bf17-4010-b723-8f7135181aa3@gmail.com> Date: Thu, 4 Jan 2024 16:22:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] libcpp: add function to check XID properties Content-Language: en-US To: Joseph Myers , Arthur Cohen Cc: gcc-patches@gcc.gnu.org, gcc-rust@gcc.gnu.org, Raiki Tamura References: <20230908145908.915341-1-arthur.cohen@embecosm.com> <1f218960-1c67-31d1-5355-7d3c4f5639c6@codesourcery.com> From: Arthur Cohen In-Reply-To: <1f218960-1c67-31d1-5355-7d3c4f5639c6@codesourcery.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: Hi Joseph, Thanks for the review! On 12/18/23 20:00, Joseph Myers wrote: > On Fri, 8 Sep 2023, Arthur Cohen wrote: > >> + if (c < 0x80) >> + { >> + if (('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z')) >> + return CPP_XID_START | CPP_XID_CONTINUE; >> + if (('0' <= c && c <= '9') || c == '_') >> + return CPP_XID_CONTINUE; > > This may be an artifact of how the patch was mailed, but indentation seems > off here (should be six spaces for both return statements) > >> + md = (mn + mx) / 2; >> + if (c <= ucnranges[md].end) >> + mx = md; >> + else >> + mn = md + 1; > > And likewise here (should be a tab for both assignments). > > OK with those indentation fixes. > Thanks for noticing - this was indeed misindented. I'll make the suggested fixes and will push the patch. Best, Arthur