From owner-cvs-gnu Fri Sep 19 06:42:38 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id GAA12420 for cvs-gnu-outgoing; Fri, 19 Sep 1997 06:42:38 -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 GAA12398; Fri, 19 Sep 1997 06:42:32 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id XAA17971; Fri, 19 Sep 1997 23:40:16 +1000 Date: Fri, 19 Sep 1997 23:40:16 +1000 From: Bruce Evans Message-Id: <199709191340.XAA17971@godzilla.zeta.org.au> To: jonny@coppe.ufrj.br, phk@FreeBSD.ORG 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 Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >#define quoting(Poul-Henning Kamp) >// Many places in the code NULL is used in integer context, where >// plain 0 should be used. This happens to work because we #define >// NULL to 0, but is stylistically wrong and can cause problems >// for people trying to port bits of code to other environments. > >Is there any problem in defining NULL to ((void *)0) ? Yes, it would require fixing all the code that uses NULL in integer context, and would hide the opposite problem of misuse of NULL in non-integer contexts, e.g., void foo(bar) void *bar; { ... } ... foo(NULL); /* no prototype in scope */ `lint -p' should warn that the arg is inconsistent, but can't do so if NULL is ((void *)0). Bruce