[RFC/AIX] xm-aix4.h - Can we remove NULL re-define?
Andrew Cagney
cagney@gnu.org
Sun Aug 8 14:00:00 GMT 2004
> config/xm-aix4.h contains the following definition:
>
> | /* Brain death inherited from PC's pervades. */
> | #undef NULL
> | #define NULL 0
I'd assume that the PC perversity was along the lines of either:
-- NULL not defined
-- #define NULL ((void *)0)
where PC is AIX running on an i386 (yea, right :-).
> Is this still needed? Where does this come from?
>
> It looks pretty scary that a compiler would actually defined NULL
> as being non-zero. I have always heard that NULL is not garantied
> to be zero, but I've seen so much code kind of confusing NULL and
> zero that I thought nobody in their right mind would actually do
> otherwise...
>
> If still necessary, can this be replaced by something like this in
> defs.h?
>
> #if (NULL != 0)
> #undef NULL
> #define NULL 0
> #endif
So just delete it.
Andrew
More information about the Gdb-patches
mailing list