Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • 3
    This syntax will not be in C23 so it seems like nonsense to me. And you can't have arrays of void anyway so I don't know what they were even thinking... Commented Sep 4, 2023 at 7:59
  • 1
    I think the goal of "self-documenting APIs" is fantastic. void issue aside, the readability of the language would benefit from this VLA notation. The idea needs work, but I think it has merit. Commented Sep 4, 2023 at 8:04
  • 1
    @Lundin, quite right! The 1eed67e commit's message shows more ambition (that one day all C code will be better self-documented, not only Linux code). It's a beautifully written commit message Commented Sep 4, 2023 at 8:57
  • 1
    As for if this was proposed to the ISO WG, I think not. There's a copy of the commit/proposal sent by email to members of the ISO WG14 but that's about it. It is not a formal proposal. Notably, Uecker is the one behind the VLA changes proposal N2992 etc. This got voted in and will be in C23. But it only means that pointer to VLA types is once again mandatory like in C99. Declaring objects of VLA type is still optional as per __STDC_NO_VLA__. And this alien VLA syntax in man will not be in C23. Commented Sep 4, 2023 at 8:58
  • 1
    Right... the "weird" notation/syntax is an issue distinct from the VLA features that have been adopted for inclusion in C23, like the automatic scoped allocation. OP's question is about the exotic notation and its origin, rather than what new bells and whistles will be added in the next iteration of the C standard; So, that's what the answer focuses on... the notation and the goal of improving documentation (self-documentation and manpage docs) Commented Sep 4, 2023 at 9:18