diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-30 02:46:26 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-30 02:46:29 +0100 |
commit | 196accbfe0ac77e492a67cc2d49821ae2c94535b (patch) | |
tree | cb8eb5965b7fdf2bc3992822cf73fc535eaaceda /include | |
parent | add reopen (diff) | |
download | slibc-196accbfe0ac77e492a67cc2d49821ae2c94535b.tar.gz slibc-196accbfe0ac77e492a67cc2d49821ae2c94535b.tar.bz2 slibc-196accbfe0ac77e492a67cc2d49821ae2c94535b.tar.xz |
deferencing null is legal
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r-- | include/stddef.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/stddef.h b/include/stddef.h index c2a806b..8330da4 100644 --- a/include/stddef.h +++ b/include/stddef.h @@ -42,6 +42,16 @@ * but excessive use of C++, and especially it * features, is harmful too. * + * Strictly speaking, to deference `NULL` is not an + * illegal action, but the operating system will + * kill you with `SIGSEGV` (segmentation fault or + * acess violation), and makes your you have no reason + * to my never mapping any memory there. However, the + * operating system itself, and programs running + * before the operating system, that is, any program + * not abstracted away from the hardware by virtual + * memory, have use of the address 0. + * * @etymology Pointer with numerical value (0). * * @since Always. |