This commit is contained in:
Miloslav Ciz 2022-12-09 14:54:07 +01:00
parent df321dd3b1
commit 50e8d1106d
16 changed files with 112 additions and 24 deletions

View file

@ -36,7 +36,7 @@ int main(void)
**Bit shifts by type width or more are undefined.** Also bit shifts by negative values are undefined. So e.g. `x >> 8` is undefined if width of the data type of `x` is 8 bits.
**Overflow behavior of signed addition is not guaranteed.** Sometimes we suppose that addition of two signed integers that are past the data type's limit will produce two's complement overflow, but in fact this operation's behavior is undefined.
**Overflow behavior of signed type operations is not specified.** Sometimes we suppose that e.g. addition of two signed integers that are past the data type's limit will produce two's complement overflow, but in fact this operation's behavior is undefined, C99 doesn't say what representation should be used for numbers.
## Memory Unsafety