This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Pointer woes... (int) 0 or (void *) 0 for NULL???


    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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]