"Tautological pointer comparison" build failure(s)
clang 11.0.0
Incorrect code...
#include
void foo() {
int arr[5];
int x;
// warn on these conditionals
if (foo);
if (arr);
if (&x);
if (foo == NULL);
if (arr == NULL);
if (&x == NULL);
}
void f(int &x) {
if (&x == nullptr) { }
}
gcc with -Wall also detects some of these errors but not the one involving NULL.
Package | Version | Supposed error message | Full log |
Bug report |
cups-bjnp | 2.0.3-1 | bjnp-commands.c:188:9: error: comparison of array 'printer_id' not equal to a null pointer is always true [-Werror,-Wtautological-pointer-compare]
| Log |
|
1 errors