C2x

C2x is an informal name for the next (after C18) major C language standard revision.[1]

It is not expected to be voted on until 2021.[2]

It adds a new principle to the "Original Principles" of C:

15. Application Programming Interfaces (APIs) should be self-documenting when possible. In particular, the order of parameters in function declarations should be arranged such that the size of an array appears before the array. The purpose is to allow Variable-Length Array (VLA) notation to be used. This not only makes the code's purpose clearer to human readers, but also makes static analysis easier. Any new APIs added to the Standard should take this into consideration.

Features[edit]

Among proposed features:

  • decimal floating-point type
  • single-argument _Static_assert, attributes
  • extended binary floating-point arithmetic, decimal floating-point arithmetic
  • memccpy(), strdup(), strndup()

Support[edit]

The GCC 9 compiler has -std=c2x[2] option to support this standard.

References[edit]

External links[edit]