Mercurial > hg > octave-nkf > gnulib-hg
changeset 4797:84a4a0e1da42
(foo *) NULL + 0 == NULL
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Thu, 16 Oct 2003 18:28:06 +0000 |
parents | 47a39b145833 |
children | 1203540119dc |
files | ChangeLog README |
diffstat | 2 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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.
--- a/README +++ b/README @@ -133,6 +133,9 @@ * 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