xmame  

Re: Insignificant unofficial b10 bug

Simon Hosie
Mon, 11 Dec 2000 22:00:25 -0800

On Mon, 11 Dec 2000, Lawrence Gold wrote:
> For some reason, the line that gcc is complaining about is setting an
> integer equal to NULL, which is usually defined to be a zero-valued
> pointer.
> 
> Don't know why they didn't just set it to 0.  It's probably just an
> oversight.  At any rate, it shouldn't cause any problems besides the
> compiler warning.

It's not an oversight at all.  A zero-valued pointer is not an integer, and
cannot be implicitly cast to an integer.  In the situations where NULL can
be assigned to an integer it has usually been defined as 0. That can cause
trouble in untypechecked situations.  In DOS compilers, for example, where a
pointer may be 32 bits and an integer 16 (the memory models with more than
64k dataspace), and you're assembling a variable length argument list.
If you want an integer 0 then use the appropriate symbol.
---------------------------------------------------------------------------
Send administrative requests to [EMAIL PROTECTED]