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: linux libio status


> 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


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