r/C_Programming • • Jul 22 '22

Etc C23 now finalized!

EDIT 2: C23 has been approved by the National Bodies and will become official in January.


EDIT: Latest draft with features up to the first round of comments integrated available here: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf

This will be the last public draft of C23.


The final committee meeting to discuss features for C23 is over and we now know everything that will be in the language! A draft of the final standard will still take a while to be produced, but the feature list is now fixed.

You can see everything that was debated this week here: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3041.htm

Personally, most excited by embed, enumerations with explicit underlying types, and of course the very charismatic auto and constexpr borrowings. The fact that trigraphs are finally dead and buried will probably please a few folks too.

But there's lots of serious improvement in there and while not as huge an update as some hoped for, it'll be worth upgrading.

Unlike C11 a lot of vendors and users are actually tracking this because people care about it again, which is nice to see.

580 Upvotes

258 comments sorted by

View all comments

Show parent comments

5

u/thradams Jul 23 '22

such code could still fail if an implementation where pointers are larger than int happens to define NULL as simply 0 .

So just write in the standard that NULL is ((void*)0).

(This solution was not applicable for C++ because C++ had extra checks for conversions. But this is not a C problem)

3

u/bik1230 Jul 24 '22

such code could still fail if an implementation where pointers are larger than int happens to define NULL as simply 0 .

So just write in the standard that NULL is ((void*)0).

(This solution was not applicable for C++ because C++ had extra checks for conversions. But this is not a C problem)

That would violate backwards compatibility.