From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Florian Weimer Newsgroups: gmane.emacs.bugs Subject: bug#59435: 29.0.50; tree-sitter fails to fontify or indent simple function Date: Tue, 06 Dec 2022 22:08:14 +0100 Message-ID: <87bkog5jgh.fsf@oldenburg.str.redhat.com> References: <871qpw7s9k.fsf.ref@yahoo.com> <871qpw7s9k.fsf@yahoo.com> <3A4C0323-634D-437D-9510-50E59A254619@gmail.com> <87mt8k5xm3.fsf@yahoo.com> <83wn7o2z2v.fsf@gnu.org> Mime-Version: 1.0 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="19821"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cc: Po Lu , 59435@debbugs.gnu.org, casouri@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 06 22:09:14 2022 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 1p2fBi-0004wp-EC for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Dec 2022 22:09:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2fBZ-0002F1-Cb; Tue, 06 Dec 2022 16:09:05 -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 1p2fBW-0002AL-Uf for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2022 16:09: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 1p2fBW-0006tS-LK for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2022 16:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2fBW-0008Al-5s for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2022 16:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Florian Weimer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Dec 2022 21:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59435 X-GNU-PR-Package: emacs Original-Received: via spool by 59435-submit@debbugs.gnu.org id=B59435.167036090531407 (code B ref 59435); Tue, 06 Dec 2022 21:09:02 +0000 Original-Received: (at 59435) by debbugs.gnu.org; 6 Dec 2022 21:08:25 +0000 Original-Received: from localhost ([127.0.0.1]:45164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2fAu-0008AV-JT for submit@debbugs.gnu.org; Tue, 06 Dec 2022 16:08:24 -0500 Original-Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:30926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2fAr-0008AN-7b for 59435@debbugs.gnu.org; Tue, 06 Dec 2022 16:08:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670360900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Fh96CkY5xxT3kKnkgDUgAFoQ3Zl8VtNgVPc0nNTLsAo=; b=OBLgPLdftosGXQIzhU8omERpr0JE+kZfKhRNfVQ6eoN2JZPRnuUqkcrKvPP03GatJvhZ1j Bi2kbmdB1akuzQRXzKTQ6YOxa14b/omkKjzX1XhPZG6MtcxcxdbvBWvzrXvGtxPlbZHrVK zGPpqCSmcy6GfbV2l5AnswvAF/nPvJw= Original-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-511-1xpZAN8aPzyoUlOVm714AQ-1; Tue, 06 Dec 2022 16:08:19 -0500 X-MC-Unique: 1xpZAN8aPzyoUlOVm714AQ-1 Original-Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CF3368828C3; Tue, 6 Dec 2022 21:08:18 +0000 (UTC) Original-Received: from oldenburg.str.redhat.com (unknown [10.2.16.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DEA96C15BA4; Tue, 6 Dec 2022 21:08:17 +0000 (UTC) In-Reply-To: <83wn7o2z2v.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 21 Nov 2022 15:53:44 +0200") X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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:250142 Archived-At: * Eli Zaretskii: >> Cc: 59435@debbugs.gnu.org >> Date: Mon, 21 Nov 2022 19:57:08 +0800 >> From: Po Lu via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >>=20 >> > As for ifsubmitbufl, tbase, and l, I don=E2=80=99t really understand t= he >> > syntax here, and I think neither does tree-sitter . In general >> > tree-sitter struggles with nonstandard (in its book anyway) syntax. >>=20 >> Well, that code is 100% valid C. > > It's K&R C, which is used very rarely these days, and it sounds like the > next version of GCC will reject it, since C2x makes it invalid. Some clarification: Implicit ints were removed from the language in 1999. GCC 14 (to be released in 2024) will likely no longer accept them by default, along with implicit function declarations (also removed in 1999). But you can still get them back using -std=3Dgnu89, and there are no plans to remove that. Old-style function definitions will finally be removed in C2X (which will probably be called C23), but I've been told that it will be several years (but probably not anything close to 25) until GCC switches to -std=3Dgnu23 (or whatever the year will be the year of the standard in the end). Function declarations which are not a prototype=E2=80=94void foo();= =E2=80=94will change meaning and denote a function with an empty parameter list, same as today: foo(void);. Old-style function declarations are still in C18, and so are function declarations without a prototype. Thanks, Florian