cproc implements many C23 features, but some are still not implemented
(notably, constexpr, auto, and #embed).
TODO: Check implications of N2838, N2819, and N2836.
_Static_assert without messageC11 required that static assertions always contained a message. C23
now allows _Static_assert with just an expression.
C23 introduces attribute syntax that can appear in many different locations, affecting various entities. All the standard attributes can safely be ignored.
C23 introduces UTF-8 character constants using the syntax u8'a'.
Compared to an unprefixed character constant, they have type unsigned char instead of int, and are guaranteed to use UTF-8 encoding
rather than the execution character set. Since the character in a
UTF-8 character constant must have a single-byte UTF-8 encoding,
this type of character constant could be useful when you need the
ASCII value of a character, but do not want to depend on any
particular execution character set.
C23 removes K&R syntax for function definitions. Function declarations without a parameter type list that are not part of a definition continue to work the same as before.
In previous revisions of C, labels like foo:, case 123:, or
default: could only precede statements. This was relaxed in C23,
and they can now appear intermixed with declarations in compound
statements.
C23 allows you to omit the name of a parameter in the prototype of a function definition that does not use that parameter.
C23 allows binary integer constants in addition to octal, decimal,
and hexadecimal, using syntax like 0b01101011.
C23 bans adjacent string literals with differing prefixes. However, it is still valid to concatenate unprefixed literals with prefixed literals.
C23 allows you to use ' to separate digits in all integer and
floating constants.
C23 introduces a new family of types _BitInt(N), referred-to as
bit-precise integer types. These types have the given width and
use special integer promotion rules. Their conversion rank follows
from their width, except that the rank order between a bit-precise
type and a standard type with the same width is implementation-defined
C23 adds a new suffix, wb or WB, to write integer constants
with bit-precise integer types introduced in N2763. The width of
the bit-precise integer type chosen is the minimum required to
represent the constant (taking into account the sign bit). Unlike
standard integer constants, the signedness of the integer type does
not depend whether the constant is written in decimal or not.
Constants with suffix uwb are always unsigned, and constants with
suffix wb are always signed.
C99 first introduces VLAs, but they were made optional in C11. In C23, it is optional to support stack-allocated VLAs, but variably-modified types (those involving VLAs, such as a pointer to a VLA) must be supported.
C23 allows empty initializers to initialize an object as if it had static storage duration.
C23 adds the typeof(E) type specifier to specify type of expression
E. Arrays and function designator expressions do not decay into
pointers, just like when used with sizeof. You can use a typename
with typeof to specify that same type.
C23 also introduces typeof_unqual, which behaves the same as
typeof except that the specified type is unqualified.
C11 used the reserved namespace of identifiers beginning with _
and a capital letter for new keywords _Alignas, _Alignof,
_Bool, _Static_assert, and _Thread_local.
C23 reservers new identifiers with more natural spelling: alignas,
alignof, bool, static_assert, thread_local.
C23 introduces new keywords for true and false, referring to
predefined constants for 1 and 0 respectively. These constants now
have type bool instead of int.
C23 allows variadic functions with no named parameters. The second argument to the va_arg macro is now optional and is only used for backwards compatibility.
C23 allows enumerators outside the range of int. When an enum
type contains such an enumerator, its type during processing of the
enum is the type of the initializing expression, or the type of the
previous enumerator if there is no initializing expression. In the
latter case, if the type of the previous enumerator can't represent
the current value, an integer type with the same signedness capable
of representing the value is chosen. Outside of an enum containing
a large enumerator, the types of all enumerators are changed to the
the enum type.
C23 allows enum types with fixed underlying types using syntax like
enum E : unsigned long. These enum types are compatible with the
underlying type, and all enumerator constants have the enum type.
Enum types with fixed underlying types are complete by the end of the underlying type specifier, so they can be forward-declared and used inside the enum.
C23 introduced __has_c_attribute in preprocessor conditionals to
query the support of a particular attribute.
C23 array types always have the same qualifiers (except for _Atomic)
as their element type. This ensures that the normal rules of
qualifiers during pointer assignment work for array types. In other
words, const int (*p)[2] = (int (*)[2])0; should work the same
way as const int *p = (int *)0;.
#elifdef and #elifndefC23 adds new preprocessing directives as a short-hand for #elif defined(...) and #elif !defined(...).
C11 first introduced _Noreturn as a function specifier. C23, with the introduction of attributes, adds this as an attribute, and deprecates the function-specifier.
#embedconstexpr specifier for object definitionscommit d1c53ddf56571573a7025324c8dd5c6d547a4d1f Author: Michael Forney <[email protected]> Date: 2026-04-27T00:23:24-07:00 qbe: Use extern for globals with external linkage