From 7fd2829dd83186fadc9cc23de2859c5819ce8337 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 16 Oct 2003 18:28:06 +0000 Subject: [PATCH] (foo *) NULL + 0 == NULL --- ChangeLog | 4 ++++ README | 3 +++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index d5d3f385ba..a7dffa3d18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-10-16 Paul Eggert + + * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL. + 2003-10-14 Bruno Haible * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list. diff --git a/README b/README index 25907e986f..fa26478e5c 100644 --- a/README +++ b/README @@ -133,6 +133,9 @@ as well. GNULib code makes the following additional assumptions: * Objects with all bits zero are treated as 0 or NULL. For example, memset (A, 0, sizeof A) initializes an array A of pointers to NULL. + * Adding zero to a null pointer does not change the pointer. + For example, 0 + (char *) NULL == (char *) NULL. + The above assumptions are not required by the C or POSIX standards but hold on all practical porting targets that we're familiar with. If you have a porting target where these assumptions are not true, we'd -- 2.30.2