From: Florian Weimer <fweimer@redhat.com>
To: Po Lu <luangruo@yahoo.com>
Cc: 59435@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>, casouri@gmail.com
Subject: bug#59435: 29.0.50; tree-sitter fails to fontify or indent simple function
Date: Wed, 07 Dec 2022 11:50:44 +0100 [thread overview]
Message-ID: <87v8mnh4hn.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <877cz4m3fk.fsf@yahoo.com> (Po Lu's message of "Wed, 07 Dec 2022 09:02:23 +0800")
* Po Lu:
> Florian Weimer <fweimer@redhat.com> 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=gnu89, and there are no plans to remove
>> that.
>
> What about -std=gnu99? 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=gnu89.
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=gnu99 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=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);.
>
> 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=gnu23 becomes the default, GCC will probably start warning
about calling ()-declared functions with extra arguments, to help with
porting to a future -std=gnu32-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
next prev parent reply other threads:[~2022-12-07 10:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <871qpw7s9k.fsf.ref@yahoo.com>
2022-11-21 6:09 ` bug#59435: 29.0.50; tree-sitter fails to fontify or indent simple function Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-21 9:45 ` Yuan Fu
2022-11-21 11:57 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-21 13:53 ` Eli Zaretskii
2022-11-24 23:38 ` Richard Stallman
2022-11-25 5:12 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-28 21:37 ` Richard Stallman
2022-11-29 0:46 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-04 23:12 ` Richard Stallman
2022-12-05 1:15 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-25 6:38 ` Yuan Fu
2022-11-25 7:45 ` Eli Zaretskii
2022-11-28 21:37 ` Richard Stallman
2022-12-06 21:08 ` Florian Weimer
2022-12-07 1:02 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-07 10:50 ` Florian Weimer [this message]
2022-12-07 11:01 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-21 13:52 ` Stefan Kangas
2022-11-23 23:31 ` Yuan Fu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v8mnh4hn.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=59435@debbugs.gnu.org \
--cc=casouri@gmail.com \
--cc=eliz@gnu.org \
--cc=luangruo@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.