Update
This commit is contained in:
parent
82c02a1627
commit
72aebe3467
16 changed files with 68 additions and 35 deletions
|
@ -32,11 +32,11 @@ int main(void)
|
|||
}
|
||||
```
|
||||
|
||||
**Char data type signedness is not defined**. The signedness can be explicitly "forced" by specifying `signed char` or `unsigned char`.
|
||||
**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. For [portability](portability.md), predictability and safety **it is safer to use unsigned types**.
|
||||
|
||||
**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 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.
|
||||
**Char data type signedness is not defined**. The signedness can be explicitly "forced" by specifying `signed char` or `unsigned char`.
|
||||
|
||||
## Memory Unsafety
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue