John Cowan wrote in
<CAD2gp_SV19s6yHsdApn8Rfkgb3OZCVFdd++_MWTsX5b7c_Jbig(a)mail.gmail.com>:
|The confusion (I dare not call it a flame war) is arising out of the
|difference between an object with all bits zero and a 0 constant (or
|equivalently 2*0 or 3-3 or what not). 0 in pointer context is always a
|null pointer, but it may or may not be all-bits-zero. 0 in integer context
|is, on any sane machine, all-bits-zero (on 1's-complement machines it may
|also be all-bits-one).
|
|Personally, when I was programming in C I defined a macro #define
|NULLPTR(t) ((t)0), so that I would write NULLPTR(char *) or NULLPTR(int *)
|or whatever the Right Thing was.
And i think too that POSIX is about to define this explicitly in
the future (regarding all bits zero).
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)