This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: linux libio status
- To: Joe Buck <jbuck at synopsys dot com>
- Subject: Re: linux libio status
- From: Per Bothner <bothner at cygnus dot com>
- Date: Wed, 15 Oct 1997 16:51:56 -0700
- cc: egcs at cygnus dot com
> In that case, NULL must be defined to be 0, nothing else.
I can live with that, but it would be nice to a warning if NULL
is used in an int context.
Currently, __null is mapped into null_node, which (when -ansi is not
specified) is basically basically (void*)0. I missed the early
context of this discussion, but I gather this causes some problems,
some of which are related to overloading.
I suggest instead that null_node be 0 - the same value and type as
integer_zero_node, but a different tree node. Then NULL would work
identically to the literal 0. However, we can add a check when
null_node is treated as an integer (such as assigning to a int
function parameter), and print a warning in those cases.
--Per Bothner
Cygnus Solutions bothner@cygnus.com http://www.cygnus.com/~bothner