This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Pointer woes... (int) 0 or (void *) 0 for NULL???
- To: egcs at cygnus dot com
- Subject: Re: Pointer woes... (int) 0 or (void *) 0 for NULL???
- From: Mark Schaefer <mschaefer at dsai dot com>
- Date: Thu, 12 Mar 1998 16:51:51 -0700
- Organization: Decision-Science Applications, Inc.
- References: <01BD4CD0.E9408470.kaz@cafe.net>
Egcs developers,
Here's the problem as far as I can tell:
In the egcs distribution is a set of C++ include files that are by
default installed into /usr/local/include. Two files (libio.h, and
streambuf.h) have the following code:
#ifndef NULL
#ifdef __GNUG__
#define NULL (__null)
#else
#define NULL (0)
#endif
#endif
That macro is killing me for some reason. I keep on getting this
error:
cannot convert `0' from type `{unknown type} *' to type `void
(UiCallbackHandler::*)(_WidgetRec *, void *, void *)'
However, I can't seem to reproduce it in a small test case. It may
be a clash with X of Motif, but I removed the code above and #defined it
as 0, and it fixed all my ills. If there's any real interest, I'll try
to come up with a testcase.
Thanks!! (BTW: This is tons!! better than 2.7.2!)
--
Mark Schaefer