A _Bool is defined by the C standard to be an unsigned type containing either 0 or 1. If a value of 1 of type _Bool is incremented, there are, as far as I can see, two options:
- The value wraps around from 1 to 0
- The value is incremented to 2, which is nonzero, and hence is changed into 1 when converted back to a _Bool
On GCC and Clang on my system, the behaviour seems to be the latter. Is this well-defined by the standard?