_BitInt(1)Authors: Joseph Myers
Date: 2026-11-02
Submitted against: C2Y (N3998 draft)
Status: Open
The following issue was raised by Jakub Jelinek.
The semantics of ++ and --, both prefix and postfix, are defined
in terms of the adjustment, which has the value 1 and for integer
types has the same type as the operand.
This definition does not work for signed _BitInt(1) which was
introduced in C2Y, because that type does not have value 1. It would
be possible to define ++ as subtracting (_BitInt(1))-1 and -- as
adding (_BitInt(1))-1, but that would complicate the wording (or
make it somewhat counterintuitive if -1 of the correct type is used
in all cases even when 1 can also be represented, rather than just for
_BitInt(1)).