(foo *) NULL + 0 == NULL
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Oct 2003 18:28:06 +0000 (18:28 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Oct 2003 18:28:06 +0000 (18:28 +0000)
ChangeLog
README

index d5d3f385ba4c4151bf1bf0832930f7219e85a1f5..a7dffa3d185151f3ec4a7ce66b7192053f016817 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-10-16  Paul Eggert  <eggert@twinsun.com>
+
+       * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
+
 2003-10-14  Bruno Haible  <bruno@clisp.org>
 
        * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
diff --git a/README b/README
index 25907e986f20c61cc1f54a89c68a3f7cf4f0b85d..fa26478e5c8b4e500fe9755bbcbef015efe7ba6a 100644 (file)
--- 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