A classic case for static analyzers. Clang with -Wall gives you:<p><pre><code>    int.c:3:12: warning: indirection of non-volatile null pointer will be deleted,
      not trap [-Wnull-dereference]
</code></pre>
Much better, scan-build:<p><pre><code>    int.c:3:12: warning: Dereference of null pointer
    return *(int*)0;</code></pre>