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: GCC headers and DJGPP port


> Date: Thu, 20 Jul 2000 09:29:35 +0200
> From: "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de>
> 
> > Seriously, though: the conclusion was that we didn't like the
> > redefinition of NULL in C++ headers (see my other message for the
> > problems this causes).
> 
> So you had all this discussion to agree on a mental state (you don't
> like it)?

No, we actually acted on that (by blocking redefinition of NULL in the
C headers).

> I had hoped you could have concluded that it either does or
> does not break the library.

We couldn't do that because we had no information on how __null works
in the C++ compiler.  If we missed something in the docs, please tell
where we should have read about it.

> Please try to be technical instead of political - especially if you
> are asking the same from GCC developers!

I thought I was technical.  I explained the technical reasons in a
message I sent today.  If it didn't yet reach you, soon it will.  If
I still failed to explain something, please tell what needs further
explanation.

> It's very easy. In C++, NULL is an "implementation-defined C++ null
> pointer constant", according to 18.1, [lib.support.types]/4. That
> means, "possible definitions include 0 and 0L, but not (void*)0".

Thank you for this information.

What is of interest to us is what will a C function see when called
with a __null argument from a C++ program.  This is required to DTRT
in C headers so that they would work with C++ programs regardless of
the order of headers inclusion (since some headers in libstdc++ define
NULL).

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