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: Wed, 07 Dec 2022 11:50:44 +0100 Message-ID: <87v8mnh4hn.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> <87bkog5jgh.fsf@oldenburg.str.redhat.com> <877cz4m3fk.fsf@yahoo.com> 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="22512"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cc: 59435@debbugs.gnu.org, Eli Zaretskii , casouri@gmail.com To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 07 11:52:26 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 1p2s2M-0005gv-HQ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Dec 2022 11:52:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2s23-0007C0-5m; Wed, 07 Dec 2022 05:52:07 -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 1p2s1y-0007A7-QS for bug-gnu-emacs@gnu.org; Wed, 07 Dec 2022 05:52: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 1p2s1y-00069b-I1 for bug-gnu-emacs@gnu.org; Wed, 07 Dec 2022 05:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2s1y-0002To-AE for bug-gnu-emacs@gnu.org; Wed, 07 Dec 2022 05:52: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: Wed, 07 Dec 2022 10:52: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.16704102629511 (code B ref 59435); Wed, 07 Dec 2022 10:52:02 +0000 Original-Received: (at 59435) by debbugs.gnu.org; 7 Dec 2022 10:51:02 +0000 Original-Received: from localhost ([127.0.0.1]:49507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2s0z-0002TF-Jp for submit@debbugs.gnu.org; Wed, 07 Dec 2022 05:51:01 -0500 Original-Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:21445) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2s0t-0002T8-Km for 59435@debbugs.gnu.org; Wed, 07 Dec 2022 05:51:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670410254; 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=ny+svREa6jrZOxaA23OO3H8Y/WdczuJNZZgt3jdKEfY=; b=JXOiBnHDf/O6fCC52kreGmLPpAItj5qrzybxJwA6h7ETI9LLJtfXEX1R6XKy+fgwq+b+0k numVKtcbyMghii+Gu2P1HSg29Jih5y+LhtraqQ3xmIpThdahAkDGtPyCgaFZqKeUevUslN lmr5BUv9uxWvEVL//TAHkRf3O7tFmHo= 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-223-cH7DqF4ROzWPSSaG6f-oZg-1; Wed, 07 Dec 2022 05:50:49 -0500 X-MC-Unique: cH7DqF4ROzWPSSaG6f-oZg-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 A753E811E67; Wed, 7 Dec 2022 10:50:48 +0000 (UTC) Original-Received: from oldenburg.str.redhat.com (unknown [10.2.16.63]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B461CC15BA4; Wed, 7 Dec 2022 10:50:47 +0000 (UTC) In-Reply-To: <877cz4m3fk.fsf@yahoo.com> (Po Lu's message of "Wed, 07 Dec 2022 09:02:23 +0800") 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:250176 Archived-At: * Po Lu: > Florian Weimer writes: > >> 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. > > What about -std=3Dgnu99? Is there a way to get them back there? It's odd to ask for a C99 mode explicitly and depend on a feature that was removed from C99. If you write C89 code, you should probably use -std=3Dgnu89. On the other hand, the largest benefit will come from change the default. From that perspective, it won't be necessary to change the -std=3Dgnu99 behavior. >> 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 t= he >> 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);. > > No more: > > int (*pFillSpans) (); > > (*pFillSpans) (pDrawable, pGc, nInit, pptInit, pwidthInit, fSorted) > > ? Right, it's an argument list mismatch. > Will there be an option to get that back in gnu23? I'm not the C frontend maintainer. It seems unlikely that this is going to be supported because it's one of the major C23 changes. Before -std=3Dgnu23 becomes the default, GCC will probably start warning about calling ()-declared functions with extra arguments, to help with porting to a future -std=3Dgnu32-by-default change. -Wstrict-prototypes is not a good proxy for this because it will warn about ()-style declarations even in contexts where C23 will align with what the programmer intended (no arguments accepted). Thanks, Florian