[Bug c++/91335] False positive "unused variable" warning with variable initialized in 'if' condition
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Aug 5 09:50:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91335
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
You can still do that without a named variable:
if (static_cast<int*>(foo())) {
return 1;
}
More information about the Gcc-bugs
mailing list