Mail Archives: djgpp-workers/1998/03/26/21:01:08
At 02:50 3/26/1998 +0100, Morten Welinder wrote:
>
>__null was introduced by the EGCS people because...
>
>1. "0" doesn't work well on machine for which
> sizeof (int) != sizeof (void *).
>2. "0L" has similar problems.
Just curious, but how do they make it work in plain C? IIRC `int *foo = 0'
is valid ANSI C, and machines with different pointer sizes just have to
figure it out somehow. I assume the compiler can handle a value of 0 being
used as a pointer and act accordingly? In that case, why does that solution
not work for C++?
Nate Eldredge
eldredge AT ap DOT net
- Raw text -