This is the mail archive of the gcc-patches@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: libio/gen-params and linuxlibc1


  In message <199909061541.IAA27556@zack.bitmover.com>you write:
  > 
  > While doing some testing with the old Linux C library I ran into an
  > interesting interaction bug in libio.
  > 
  > _G_config.h has at the very end
  > 
  > #undef NULL
  > #define __need_NULL
  > #include <stddef.h>
  > 
  > If stddef.h has already defined NULL, it will not do so again.  We are
  > therefore left with no definition of NULL.  This causes one category
  > of horrible breakages.  Worse, libc5's stdlib.h has
  > 
  > /* Don't ask me why. H.J. */
  > #ifndef NULL
  > #define NULL ((void *)0)
  > #endif
  > 
  > so any C++ source that includes _G_config.h and then stdlib.h will get
  > a bogus definition of NULL, leading to another category of horrible
  > breakages.
I have no idea what to do with this.  

It would have been benefitical if HJ had actually included comments for that
disgusting, horrible and simply wrong definition of NULL cited above.

jeff


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