[Bug c++/52231] [missed optimization/diagnostics] address-of-reference
pawel_sikora at zoho dot com
gcc-bugzilla@gcc.gnu.org
Tue Oct 25 17:33:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52231
Pawel Sikora <pawel_sikora at zoho dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to work| |6.2.1, 7.0
Resolution|--- |FIXED
--- Comment #8 from Pawel Sikora <pawel_sikora at zoho dot com> ---
s% ~/src/gcc-install/usr/local/bin/g++ pr52231.cpp -c -O2 -Wall -Wextra
-fdump-tree-optimized -fdiagnostics-color=never
pr52231.cpp: In function 'void bar()':
pr52231.cpp:7:17: warning: the compiler can assume that the address of 'a' will
never be NULL [-Waddress]
if ( &a == 0 ) // <== useless stmt (not diagnosed/not
optimized)
~~~^~~~
More information about the Gcc-bugs
mailing list