Re: C23 compatibility question

Yavor Doganov <[email protected]>
Newsgroups gmane.comp.lib.gnustep.general
Organization The GNU Emacs Church (Bulgarian Eparchy)
Message-ID <87frcc2kkw.GNU'[email protected]>
Agile Developer wrote:
> I was wondering whether GNU objective-c, as implemented on top of C,
> supports C23 and if the objective-c implementation is interoperable
> with C23.

The default C standard when compiling Objective-C code with GCC is C89
so as Ethan said, you must specify -std=c23 or -std=gnu23.  Note that
there are some subtle bugs like these:

GCC rejects a "for" loop declaration for a variable named "in" as this
is reserved for fast enumeration (which works in C89 for Objective-C
only):
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46473

GCC fails to recognize an ivar in a method implementation, confusing
it with an "if" variable declaration:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119117
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.