Mail Archives: djgpp-workers/2000/07/20/08:40:17
> > 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.
It is not in the texinfo documentation, as it is not intended to be
used by anybody then the "implementation" itself (which consists of
the compiler, and the standard library). There is a note in cp/NEWS
you may not have seen, though.
However, I thought you are *maintainers* of the compiler
(specifically, the DOS port of it). So if you had a long discussion,
why didn't you ask on gcc AT gcc DOT gnu DOT org, or look at the source code to
see what __null does, or consult the ChangeLogs to find out who
installed that change, and contacted the author?
> 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.
I've looked through all your messages so far, and I could only find
one problem: redefinition of NULL. Although this would be certainly a
bug, I'm not all that clear how that could ever happen. You wrote
>> The problem is with C++ programs that include <stdio.h> or <cstdio>
>> (or stddef.h etc.) after C++ headers such as <libio.h>: these
>> define NULL, and GCC then complains about its redifinition.
I don't know what your copy of stdio.h looks like, however, it should
certainly test whether NULL is defined before defining it. So in this
case, I'd say there is a bug in <stdio.h>.
It may be that there is also a bug in the program: No program should
include <libio.h>; instead, it should always include <stdio.h>, or
<iostream>.
If there were further problems, please tell me as I may have missed
them in all these messages.
> What is of interest to us is what will a C function see when called
> with a __null argument from a C++ program.
What do you mean by "will see"? At run-time, the value on the stack
will be a 0x00000000 bit pattern for the parameter, at least on 32-bit
machines.
Regards,
Martin
- Raw text -