From owner-cvs-gnu Sat Sep 20 23:00:15 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id XAA15597 for cvs-gnu-outgoing; Sat, 20 Sep 1997 23:00:15 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id XAA15579; Sat, 20 Sep 1997 23:00:04 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id PAA20728; Sun, 21 Sep 1997 15:53:28 +1000 Date: Sun, 21 Sep 1997 15:53:28 +1000 From: Bruce Evans Message-Id: <199709210553.PAA20728@godzilla.zeta.org.au> To: mike@smith.net.au, perhaps@yes.no Subject: Re: cvs commit: src/gnu/usr.bin/as/config atof-ieee.c src/gnu/usr.bin/ld/rtld rtld.c src/gnu/usr.bin/man/man man.c Cc: cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG, jonny@coppe.ufrj.br, phk@FreeBSD.ORG Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >((void*)0) is a correct definition of NULL. The other ^^^^^another >correct definition is 0. Other correct definitions: 0L /* This has a different type than plain 0. * It may be useful for hiding bugs on machines * where sizeof(long) == sizeof(void *) && * sizeof(int) < sizeof(void *), and for finding * bugs on machines where sizeof(long) > * sizeof(void *). */ 0UL /* A weirder type. This may be useful for * finding misuses of NULL in integer context */ (2 + 2 != 4) /* A gratuitously complicated constant integral * expression with value 0. This definition is * not useful. */ (sizeof(char) - (int)1.1) /* A gratuitously complicated not-obviously * constant integral expression with value 0. * This definition is not useful. */ Any of the above cast to `void *'. /* Such definitions are just silly ways of writing * ((void *)0), since they all have the same type * and value. */ Other not-quite correct definitions: 0LL /* Will probably be correct in C9X, since C9X has * long long (blech), and may already be correct * in Gnu C. This may be useful for hiding bugs * on machines where sizeof(long long) == * sizeof(void *) && sizeof(long) < sizeof(void *), * and for finding bugs on machines where * sizeof(long long) > * sizeof(void *). */ Bruce