Subject: Re: bug#59435: 29.0.50; tree-sitter fails to fontify or indent simple function

From: Florian Weimer <[email-masked]>
Date: Tue, 06 Dec 2022 22:08:14 +0100

* Eli Zaretskii:

>> Cc: [email-masked]
>> 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" <[email-masked]>
>> 
>> > As for ifsubmitbufl, tbase, and l, I don’t really understand the
>> > syntax here, and I think neither does tree-sitter . In general
>> > tree-sitter struggles with nonstandard (in its book anyway) syntax.
>> 
>> 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=gnu89, 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=gnu23 (or whatever the year will be the year of the standard in the
end).  Function declarations which are not a prototype—void foo();—will
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