From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#61403: 30.0.50; C tree-sitter bug? Date: Sun, 12 Feb 2023 00:27:18 -0800 Message-ID: <97E6246E-51E7-4F41-BCD0-AF63834FF3BD@gmail.com> References: <87h6vt364d.fsf@yahoo.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35782"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61403@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 12 09:28:24 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pR7ii-00092C-Ma for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Feb 2023 09:28:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pR7iO-000651-Up; Sun, 12 Feb 2023 03:28:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pR7iM-00064Z-74 for bug-gnu-emacs@gnu.org; Sun, 12 Feb 2023 03:28:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pR7iL-0002As-VF for bug-gnu-emacs@gnu.org; Sun, 12 Feb 2023 03:28:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pR7iL-0007dx-Qc for bug-gnu-emacs@gnu.org; Sun, 12 Feb 2023 03:28:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87h6vt364d.fsf@yahoo.com> Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Feb 2023 08:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61403 X-GNU-PR-Package: emacs Original-Received: via spool by 61403-submit@debbugs.gnu.org id=B61403.167619045729342 (code B ref 61403); Sun, 12 Feb 2023 08:28:01 +0000 Original-Received: (at 61403) by debbugs.gnu.org; 12 Feb 2023 08:27:37 +0000 Original-Received: from localhost ([127.0.0.1]:43977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pR7hx-0007dC-G3 for submit@debbugs.gnu.org; Sun, 12 Feb 2023 03:27:37 -0500 Original-Received: from mail-pj1-f42.google.com ([209.85.216.42]:43650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pR7hv-0007cv-Cp for 61403@debbugs.gnu.org; Sun, 12 Feb 2023 03:27:35 -0500 Original-Received: by mail-pj1-f42.google.com with SMTP id d13-20020a17090ad3cd00b0023127b2d602so9541989pjw.2 for <61403@debbugs.gnu.org>; Sun, 12 Feb 2023 00:27:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=2ZNyif7KBnRW1WFOSK3eNQKpp3IRD4s7Se7DSqmABXk=; b=CeZyi0m/r562A10uYVHtQL9467fvpWezIeFJdPPKwGAgLQWzQ/iN0H11szj2m715LC g8fvsiJmJvHDskJSVuUeLzQLUITBcPSD6JolOkSvMStQDc65r7H9tbBMu0UL/ujM5PY6 zUmF/ElD1Hw3xgom+td/PaMi9JVC6SmHfoPjQuhLeipgI+ZrFUJGNAJ2wRGHkyJdEonO yUlDLCA2qLL6ye9U1kk0CDCAuO1sbDDqXsnPQYj5siqCL/F5Lfy8pey8JYPsNkpwKrg4 EP7Nr0QLR5qr4CIzBklzhE2E1uaujT3SsDtWZZCry+yzWPmTWixf+hImQxPb+WOvpAkS EW2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2ZNyif7KBnRW1WFOSK3eNQKpp3IRD4s7Se7DSqmABXk=; b=xpBw3kKneJnIN0yJj5Lxvsdl40pWeHqT/mrNj61rLhdbjygV2bUNREFxAHGguboAGz JhIT5WeaNWtCPvBBEFZdOYwYy1Yq9AfWY9iietVWE9JzfjJpoejC8d31ZW4VchhG5Bdw ruuqEkN7lPpBX4VyQyrTVQ745lM7Z+2/QQ2YuKX4bLyp7DRlgnxwb3q4X9zHF7q2HwWt aLXj19D6qDHx+pt/sm+pJn6l1m60h5Fen4YOOMDvo0ErzUABV6/oRgHwz+tCOa7/7PS9 sU7JhmsrZ5/rxUlwkPQUWFczdppjQSWQUEpI2rmq91MZgc/DOmMO0yku4x4y3xUtYFdZ D2Kg== X-Gm-Message-State: AO0yUKUm+HuuwIDfCbcYYhwn3atiot/pU53YMQM2gpbc3j0kUYcn3FFG py95LdqrFzKTgmyi+ntcrU4= X-Google-Smtp-Source: AK7set8XGao61g/6k3eCm0XGyIyFPA5qkN9kS4eZwkJUg4xMT5mNsoXyt9UAwNRdC8fEJz7mWsLGpg== X-Received: by 2002:a17:902:c111:b0:198:ef76:ce98 with SMTP id 17-20020a170902c11100b00198ef76ce98mr15972688pli.54.1676190449645; Sun, 12 Feb 2023 00:27:29 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id v10-20020a1709028d8a00b00186b7443082sm6014039plo.195.2023.02.12.00.27.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Feb 2023 00:27:29 -0800 (PST) X-Mailer: Apple Mail (2.3731.300.101.1.3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255386 Archived-At: Po Lu writes: > Go to sfnt.c in the feature/android branch, and turn on c-ts-mode. > > Then, go to line 10754, around which should be the function = definition: > > /* Load the simple glyph GLYPH into the specified INTERPRETER, scaling > it up by INTERPRETER's scale, and run its glyph program if > present. Use the unscaled metrics specified in METRICS. > > Upon success, return NULL and the resulting points and contours in > *VALUE. Else, value is the reason interpretation failed. */ > > TEST_STATIC const char * > sfnt_interpret_simple_glyph (struct sfnt_glyph *glyph, > struct sfnt_interpreter *interpreter, > struct sfnt_glyph_metrics *metrics, > struct sfnt_instructed_outline **value) > { > size_t zone_size, temp, outline_size, i; > struct sfnt_interpreter_zone *zone; > struct sfnt_interpreter_zone *volatile preserved_zone; > sfnt_f26dot6 phantom_point_1_x; > > `TEST_STATIC' is fontified as a type. Perhaps tree-sitter needs > something along the lines of `c-noise-macros'? Would it be reasonable to assume that all caps "type" are almost always macros? If it is, we can optionally defontify these kind of "types". > > Likewise for _Noreturn: > > _Noreturn static void > sfnt_interpret_trap (struct sfnt_interpreter *interpreter, > const char *reason) > { > > _Noreturn is a keyword in 2011 Standard C. I think the tree-sitter > parser definition files should be updated to understand it. Makes sense. I can file an issue on tree-sitter-c=E2=80=99s repo. Yuan