cproc implements some C23 features applied to the latest drafts.
C11 required that static assertions always contained a message. C23
_Static_assert with just an expression.
C23 introduces UTF-8 character constants using the syntax
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.
In previous revisions of C, labels like
case 123:, or
default: could only precede statements. This was relaxed in C23,
and they can now appear intermixed with declarations in compound
C23 allows binary integer constants in addition to octal, decimal,
and hexadecimal, using syntax like
commit 51e61fa5fa3de8cabc2191a5c6ac4d18aaaaf049 Author: Michael Forney <firstname.lastname@example.org> Date: 2022-01-19T11:12:59-08:00 Handle unary minus specially instead of 0 - x This is necessary to fix unary negation of floating-point 0 (also depends on a pending qbe patch).