From: Andrew Cagney <ac131313@cygnus.com>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: fnasser@redhat.com, gdb-patches@sources.redhat.com
Subject: Re: [rfa/cli] s/NO_FUNCTION/NULL/
Date: Mon, 28 Jan 2002 20:51:00 -0000 [thread overview]
Message-ID: <3C56237F.4090803@cygnus.com> (raw)
In-Reply-To: <2561-Tue22Jan2002105639+0200-eliz@is.elta.co.il>
> Date: Mon, 21 Jan 2002 13:36:52 -0500
>> From: Andrew Cagney <ac131313@cygnus.com>
>>
>> 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
next prev parent reply other threads:[~2002-01-29 4:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-02 8:15 Andrew Cagney
2002-01-20 15:17 ` Andrew Cagney
2002-01-21 1:51 ` Eli Zaretskii
2002-01-21 8:51 ` Fernando Nasser
2002-01-21 9:19 ` Eli Zaretskii
2002-01-21 10:37 ` Andrew Cagney
2002-01-22 0:57 ` Eli Zaretskii
2002-01-28 20:51 ` Andrew Cagney [this message]
2002-01-29 2:10 ` Eli Zaretskii
2002-01-31 21:49 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C56237F.4090803@cygnus.com \
--to=ac131313@cygnus.com \
--cc=eliz@is.elta.co.il \
--cc=fnasser@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox