diff --git a/reference/src/layout/scalars.md b/reference/src/layout/scalars.md index 7b647cbc..a5b4e7d9 100644 --- a/reference/src/layout/scalars.md +++ b/reference/src/layout/scalars.md @@ -37,6 +37,11 @@ The `isize` and `usize` types are pointer-sized signed and unsigned integers. They have the same layout as the [pointer types] for which the pointee is `Sized`, and are layout compatible with C's `uintptr_t` and `intptr_t` types. +> **Note**: C99 [7.18.2.4](https://port70.net/~nsz/c/c99/n1256.html#7.18.2.4) +> requires `uintptr_t` and `intptr_t` to be at least 16-bit wide. All +> platforms we currently support have a C platform, and as a consequence, +> `isize`/`usize` are at least 16-bit wide for all of them. + > **Note**: Rust's `usize` and C's `unsigned` types are **not** equivalent. C's > `unsigned` is at least as large as a short, allowed to have padding bits, etc. > but it is not necessarily pointer-sized.