From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16720 invoked by alias); 29 Jan 2002 04:51:05 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16652 invoked from network); 29 Jan 2002 04:51:03 -0000 Received: from unknown (HELO localhost.cygnus.com) (24.114.42.213) by sources.redhat.com with SMTP; 29 Jan 2002 04:51:03 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.cygnus.com (Postfix) with ESMTP id 10A7E3D61; Mon, 28 Jan 2002 23:22:24 -0500 (EST) Message-ID: <3C56237F.4090803@cygnus.com> Date: Mon, 28 Jan 2002 20:51:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.7) Gecko/20020103 X-Accept-Language: en-us MIME-Version: 1.0 To: Eli Zaretskii Cc: fnasser@redhat.com, gdb-patches@sources.redhat.com Subject: Re: [rfa/cli] s/NO_FUNCTION/NULL/ References: <3C4C46E8.F48A93D7@redhat.com> <3C4C5FC4.6030609@cygnus.com> <2561-Tue22Jan2002105639+0200-eliz@is.elta.co.il> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-01/txt/msg00753.txt.bz2 > Date: Mon, 21 Jan 2002 13:36:52 -0500 >> From: Andrew Cagney >> >> My ISO C is pretty rusty, however my memory is that NULL is very very >> special. > > > In C++, but not in C, IIRC. > > >> GDB built with GCC 3.0.3. Using current GCC things died mysteriously >> part way through the build. > > > Well, until GCC 3.1 can compile the whole thing, I guess we don't > have to worry. I went and asked. The following is of course third hand: In C++, NULL can't be ``(void*)0''. It should be ``0'' but GCC likes to define it to ``__null''. The latter is a special constant with magic properties that lets GCC verify that NULL is being used correctly. In C, NULL is typically ``(void*)0''. What ever it is, it must be compatible with both data and code pointers. I think this makes using NULL more robust than NO_FUNCTION? Andrew