This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFC/AIX] xm-aix4.h - Can we remove NULL re-define?
- From: Joel Brobecker <brobecker at gnat dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: Andrew Cagney <cagney at redhat dot com>,Peter Schauer <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>,Kevin Buettner <kevinb at redhat dot com>
- Date: Sat, 7 Aug 2004 21:52:46 -0700
- Subject: [RFC/AIX] xm-aix4.h - Can we remove NULL re-define?
config/xm-aix4.h contains the following definition:
| /* Brain death inherited from PC's pervades. */
| #undef NULL
| #define NULL 0
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
--
Joel