From 196accbfe0ac77e492a67cc2d49821ae2c94535b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 30 Dec 2015 02:46:26 +0100 Subject: deferencing null is legal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- include/stddef.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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. -- cgit v1.2.3-70-g09d2