Skip to content

Commit 5175ad6

Browse files
committed
add clarification to example
1 parent d552bf5 commit 5175ad6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/cpp/ptr32-ptr64.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ For compatibility with previous versions, **_ptr32** and **_ptr64** are synonyms
2828

2929
## Example
3030

31-
The following example shows how to declare and allocate pointers with the **`__ptr32`** and **`__ptr64`** keywords.
31+
The following example shows how to declare and allocate pointers with the **`__ptr32`** and **`__ptr64`** keywords. This code will crash when compiled for 64-bit due to the pointer from `malloc` being truncated to 32-bit. Since 32-bit pointers can be represented in 64-bit, when compiled for 32-bit this code does not necessarily crash.
3232

3333
```cpp
3434
#include <cstdlib>

0 commit comments

Comments
 (0)