<div dir="ltr">Hi,<div><br></div><div>We appear to perform significantly incomplete checking for assigning a null pointer value to a _Nonnull pointer. In particular, pointer initialization and assignment is not checked:</div><div><br></div><div>// No warning on static initialization to zero<br></div><div>struct A {</div><div>  int *_Nonnull p;</div><div>} a;</div><div>int *_Nonnull b[3];<br></div><div><br></div><div>void g() {<br></div><div><div>  // No warning on initialization</div></div><div>  int *_Nonnull p = 0;</div><div>  // No warning on assignment</div><div>  p = 0;</div><div>  // No warning on assignment to member<br>  a.p = 0;<br></div><div>  // No warning on assignment to array element</div><div>  b[0] = 0;</div><div>}</div><div><br></div><div>Would it be reasonable to start warning on these cases? Are people relying on the existing behavior? (Note, I'm not suggesting we start warning on conversion from a _Nullable or _Null_unspecified pointer to a _Nonnull pointer, only when initializing or assigning to a _Nonnull pointer from a null pointer value.)</div><div><br></div><div>Regards,</div><div>Richard</div></div>