Re: [rfa/cli] s/NO_FUNCTION/NULL/

Fernando Nasser
2002-01-21T16:51:30Z

Eli Zaretskii wrote:
>
> On Sun, 20 Jan 2002, Andrew Cagney wrote:
>
> > Do you have any problems with the below?
> >
> > Andrew
> >
> > > Hello,
> > >
> > > The attached replaces the NO_FUNCTION macro with NULL. If you
> > > examine the code, function.cfunc() is only sometimes assigned the
> > > value NO_FUNCTION and no code actually tests for a value of
> > > NO_FUNCTION. Consequently, I can't see any point in having this
> > > macro.
>
> IMHO, someone should test this change with the latest versions of GCC,
> including their development line: they could have their own ideas when
> you are allowed to pass NULL, especially with all the warning options
> we use.

Besides, the NO_FUNCTION documents the meaning better than NULL
(although most people should guess). Maybe you can add a comment
somewhere nearby.

Any chance Eli's concerns become true and we get a warning because
NULL is not typed properly? Maybe you would need a cast (in which
case I would prefer the NO_FUNCTION def.

Regards,
Fernando

--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9