Other cases to test: the != operator (should warn in same cases as ==); boolean uses of pointers such as if (p), !p, p?x:y, and implicit or explicit conversion to bool (none of those boolean uses of pointers should warn since there's no explicit integer null pointer constant involved in the implicit comparison to 0). Also test that initializing a pointer with empty braces does not warn.
-- Joseph S. Myers josmy...@redhat.com