diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-08-14 17:31:49 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-06-23 07:46:40 +0200 |
| commit | 0d19a077e74ce523f05b64708517bd657721a68e (patch) | |
| tree | 7396d978a7a037f7b2c321253184a2074f9e2665 /Documentation | |
| parent | a1219bf5f756925870671497a890e0aa1f0c7354 (diff) | |
| download | sparse-dev-0d19a077e74ce523f05b64708517bd657721a68e.tar.gz | |
cast: make pointer casts always size preserving
Currently casts to pointers can be done from any integer types.
However, casts to (or from) pointers are only meaningful if value
preserving and thus between objects of the same size.
To avoid to have to worry about sign/zero extension while doing
casts to pointers it's good to only have to deal with the value
preserving ones.
Do this by doing first, if needed, a cast an integer of the same
size as a pointer before doing the cast to a pointer.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/IR.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/IR.rst b/Documentation/IR.rst index 56f02318..b7fe98a4 100644 --- a/Documentation/IR.rst +++ b/Documentation/IR.rst @@ -271,7 +271,7 @@ They all have the following signature: Cast to signed integer. .. op:: OP_UTPTR - Cast from unsigned integer to pointer type. + Cast from pointer-sized unsigned integer to pointer type. .. op:: OP_PTRCAST Cast to pointer. |
