| Summary: | Wrong location of a binary expression for -Waddress | ||
|---|---|---|---|
| Product: | gcc | Reporter: | Martin Liška <marxin> |
| Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
| Status: | NEW --- | ||
| Severity: | normal | CC: | jakub, msebor, webrown.cpp |
| Priority: | P3 | Keywords: | diagnostic |
| Version: | unknown | ||
| Target Milestone: | --- | ||
| See Also: |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78989 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78987 |
||
| Host: | Target: | ||
| Build: | Known to work: | ||
| Known to fail: | Last reconfirmed: | 2017-01-05 00:00:00 | |
| Bug Depends on: | |||
| Bug Blocks: | 103360 | ||
|
Description
Martin Liška
2017-01-04 16:24:50 UTC
Confirmed. The location doesn't look right in C either where GCC prints the following:
b.c: In function ‘main2’:
b.c:7:7: warning: the address of ‘foo’ will always evaluate as ‘true’ [-Waddres]
if (foo && bar && baz)
^~~
b.c:7:11: warning: the address of ‘bar’ will always evaluate as ‘true’ [-Waddress]
if (foo && bar && baz)
^~
b.c:7:18: warning: the address of ‘baz’ will always evaluate as ‘true’ [-Waddress]
if (foo && bar && baz)
^~
David will you be interested in the PR? |