A
andy_P
That's exactly what I said in my previous post. Standard defines
conversion from 0 to null pointer, but not backwards - from null
pointer to integral type. if(ptr) construct implies implicit
conversion from ptr to integral type. 6.3.2.3.(6) states that ptr to
integral type conversion is implementation dependent.
I am still convinced that pointer comparison should be used in C
instead of if(ptr) form.
conversion from 0 to null pointer, but not backwards - from null
pointer to integral type. if(ptr) construct implies implicit
conversion from ptr to integral type. 6.3.2.3.(6) states that ptr to
integral type conversion is implementation dependent.
I am still convinced that pointer comparison should be used in C
instead of if(ptr) form.