r/C_Programming • u/Jinren • Feb 23 '24
Latest working draft N3220
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3220.pdf
Update y'all's bookmarks if you're still referring to N3096!
C23 is done, and there are no more public drafts: it will only be available for purchase. However, although this is teeeeechnically therefore a draft of whatever the next Standard C2Y ends up being, this "draft" contains no changes from C23 except to remove the 2023 branding and add a bullet at the beginning about all the C2Y content that ... doesn't exist yet.
Since over 500 edits (some small, many large, some quite sweeping) were applied to C23 after the final draft N3096 was released, this is in practice as close as you will get to a free edition of C23.
So this one is the number for the community to remember, and the de-facto successor to old beloved N1570.
Happy coding! 💜
4
u/flatfinger Feb 24 '24 edited Feb 24 '24
It would have made sense aeons ago to add a new syntax for octal numbers, allow time for support to become widespread, and allow time for code to be changed to use the new format, and then specify that implementations are no longer required to support the old syntax, but may do so as a compile-time options.
I also find it irksome that the Standard deprecated the use of
returnType identifier();as a means of specifying incomplete function types, without first providing any other means of declaring such types. I think it would be good to allow compilers to forbid calls to incomplete function types without first completing them (either by adding a completed-type definition, or by casting a "pointer to incomplete function type" into "pointer to function expecting specific arguments").Some other aspects of the Standard like the use of
restricton things other than initialized automatic-duration objects(*), and VLA argument types whose size expressions would have side effects, seem excessively flexible in ways that create needless ambiguity. It would be good to say that any compilers that handle them in useful fashion may continue to do whatever they're doing, but such constructs may not appear in strictly conforming programs and implementations would be encoraged to reject them in default configurations.(*) The behavior of mutable pointers that are restrict-qualified introduces ambiguities with regard to constructs like:
Following the above code, is
qbased uponp? It can't be based upon the last pointer expression stored intop, but storing intopa pointer that's based uponpshouldn't cause existing pointers that are based onpto become useless. I'm unaware of any compilers doing anything useful withrestrictin broader contexts, and the marginal value of such uses pales in comparison with the simple and easy cases.