Starting from 4.8, where location description was added. $ cat /tmp/wrong-conditions.c void foo() {} void bar() {} void baz() {} int main2(int argc, int argc2) { if (foo && bar && baz) return 1; return 0; } $ ./xgcc -B. /tmp/wrong-conditions.c -c -Wall /tmp/wrong-conditions.c: In function ‘main2’: /tmp/wrong-conditions.c:7:7: warning: the address of ‘foo’ will always evaluate as ‘true’ [-Waddress] if (foo && bar && baz) ^~~ /tmp/wrong-conditions.c:7:11: warning: the address of ‘bar’ will always evaluate as ‘true’ [-Waddress] if (foo && bar && baz) ^~ /tmp/wrong-conditions.c:7:18: warning: the address of ‘baz’ will always evaluate as ‘true’ [-Waddress] if (foo && bar && baz) ^~ Location of the first is correct, last 2 are wrong.
C++ related issue: PR78988.
Also confirmed, like bug 78988. Should these two bugs be one and the same or is the location information set separately by each front end?
David will you be interested in the PR?