linux libio status

Per Bothner bothner@cygnus.com
Wed Oct 15 16:51:00 GMT 1997


> 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



More information about the Gcc mailing list